SQL injection in ADOdb PostgreSQL driver pg_insert_id() method
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
- Issue https://github.com/ADOdb/ADOdb/issues/1070
- Blog post by Marco Nappi
Credits
Thanks to Marco Nappi (@mrcnpp) for reporting this vulnerability.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | adodb/adodb-php | < 5.22.9 | 5.22.9 |
References
- https://github.com/ADOdb/ADOdb/security/advisories/GHSA-8x27-jwjr-8545
- https://nvd.nist.gov/vuln/detail/CVE-2025-46337
- https://github.com/ADOdb/ADOdb/issues/1070
- https://github.com/ADOdb/ADOdb/commit/11107d6d6e5160b62e05dff8a3a2678cf0e3a426
- https://github.com/ADOdb/ADOdb
- https://lists.debian.org/debian-lts-announce/2025/05/msg00029.html
- https://xaliom.blogspot.com/2025/05/from-sast-to-cve-2025-46337.html
- 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
- 2022: 3
- 2023: 0
- 2024: 1
- 2025: 2
- 2026: 0
-
SQL injection in ADOdb PostgreSQL driver pg_insert_id() method this entry
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.