Critical

SQL injection in ADOdb PostgreSQL driver pg_insert_id() method

  • Disclosed: 01.05.2025
  • Updated: 11.10.2026 10:22

Improper escaping of a query parameter may allow an attacker to execute arbitrary SQL statements when the code using ADOdb connects to a PostgreSQL database and calls pg_insert_id() with user-supplied data.

Note that the indicated Severity corresponds to a worst-case usage scenario.

Impact

PostgreSQL drivers (postgres64, postgres7, postgres8, postgres9).

Patches

Vulnerability is fixed in ADOdb 5.22.9 (11107d6d6e5160b62e05dff8a3a2678cf0e3a426).

Workarounds

Only pass controlled data to pg_insert_id() method's $fieldname parameter, or escape it with pg_escape_identifier() first.

References

Credits

Thanks to Marco Nappi (@mrcnpp) for reporting this vulnerability.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package adodb/adodb-php < 5.22.9 5.22.9

References

CVSS score 10/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L
Weakness (CWE)
CWE-89
Platform
Composer
Package
adodb/adodb-php
Disclosed
01.05.2025
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-8x27-jwjr-8545 - CC BY 4.0

Vulnerability history: adodb/adodb-php

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
6
First → latest
01.2022 08.2025
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 5
  • Medium 1

Disclosures per year

  1. 2022: 3
  2. 2023: 0
  3. 2024: 1
  4. 2025: 2
  5. 2026: 0
  1. Critical · 10.0 CVE-2025-54119 < 5.22.10 5.22.10
  2. SQL injection in ADOdb PostgreSQL driver pg_insert_id() method this entry
    Critical · 10.0 CVE-2025-46337 < 5.22.9 5.22.9
  3. Critical ghsa-h63c-xvpf-264j < 5.20.11 5.20.11
  4. Medium · 6.1 CVE-2016-4855 < 5.20.6 5.20.6
  5. Critical · 9.8 CVE-2016-7405 >= 5.0, < 5.20.7 5.20.7
  6. Critical · 9.1 CVE-2021-3850 < 5.20.21, >= 5.21.0, < 5.21.4 5.20.21, 5.21.4

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.