CVE-2025-46337
SQL injection in ADOdb PostgreSQL driver pg_insert_id() method
CVE-2025-46337 is a critical vulnerability (CVSS 10.0) in Adodb, published May 1, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.76%, the 55th percentile. Fixed in adodb/adodb-php 5.22.9.
ADOdb is a PHP database class library that provides abstractions for performing queries and managing databases. Prior to version 5.22.9, 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. This issue has been patched in version 5.22.9.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
10.0
SQL injection in ADOdb PostgreSQL driver pg_insert_id() method
ADOdb is a PHP database class library that provides abstractions for performing queries and managing databases. Prior to version 5.22.9, 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. This issue has been patched in version 5.22.9.
- Record
CVE-2025-46337- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L - Weakness
- CWE-89
- Updated
- 2026-11-02
EUVDEUVD-2025-13113
10.0
ADOdb is a PHP database class library that provides abstractions for performing queries and managing databases. Prior to version 5.22.9, 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. This issue has been patched in version 5.22.9.
- Record
EUVD-2025-13113- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-8x27-jwjr-8545
10.0
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.
- Record
GHSA-8x27-jwjr-8545- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L - Weakness
- CWE-89
- Updated
- 2026-11-02
NVD
10.0
ADOdb is a PHP database class library that provides abstractions for performing queries and managing databases. Prior to version 5.22.9, 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. This issue has been patched in version 5.22.9.
- Record
CVE-2025-46337- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L - Weakness
- CWE-89
- Updated
- 2026-11-02
OSV
10.0
SQL injection in ADOdb PostgreSQL driver pg_insert_id() method
ADOdb is a PHP database class library that provides abstractions for performing queries and managing databases. Prior to version 5.22.9, 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. This issue has been patched in version 5.22.9.
- Record
CVE-2025-46337- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L - Weakness
- CWE-89
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2025-46337
10.0
ADOdb is a PHP database class library that provides abstractions for performing queries and managing databases. Prior to version 5.22.9, 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. This issue has been patched in version 5.22.9.
- Record
DEBIAN-CVE-2025-46337- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L - Updated
- 2026-11-02
Show 4 moreShow less
OSVGHSA-8x27-jwjr-8545
10.0
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.
- Record
GHSA-8x27-jwjr-8545- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L - Weakness
- CWE-89
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2025-46337
10.0
ADOdb is a PHP database class library that provides abstractions for performing queries and managing databases. Prior to version 5.22.9, 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. This issue has been patched in version 5.22.9.
- Record
UBUNTU-CVE-2025-46337- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L - Updated
- 2026-11-02
OSVMGASA-2025-0179 No score
Updated php-adodb packages fix security vulnerability
ADOdb is a PHP database class library that provides abstractions for performing queries and managing databases. Prior to version 5.22.9, 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. This issue has been patched in version 5.22.9 - CVE-2025-46337.
- Record
MGASA-2025-0179- Updated
- 2026-11-02
OSVUSN-7530-1 No score
libphp-adodb vulnerability
It was discovered that ADOdb incorrectly handled SQL input. A remote attacker could use this issue to execute arbitrary SQL commands.
- Record
USN-7530-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
adodb/adodb-phpPackagist |
through 5.22.8 | 5.22.9 |
libphp-adodbDebian:12 |
before 5.21.4-1+deb12u1, plus listed versions 5.21.4-1 |
5.21.4-1+deb12u1 |
libphp-adodbDebian:13 |
before 5.22.9-0.1 | 5.22.9-0.1 |
libphp-adodbDebian:14 |
before 5.22.9-0.1 | 5.22.9-0.1 |
libphp-adodbDebian:11 |
before 5.20.19-1+deb11u2, plus listed versions 5.20.19-15.20.19-1+deb11u1 |
5.20.19-1+deb11u2 |
adodb/adodb-phpPackagist |
before 5.22.9, plus listed versions v5.19v5.20.0v5.20.1v5.20.10v5.20.11 Show 34 moreShow lessv5.20.12v5.20.13v5.20.14v5.20.15v5.20.16v5.20.17v5.20.18v5.20.19v5.20.2v5.20.20v5.20.21v5.20.3v5.20.4v5.20.5v5.20.6v5.20.7v5.20.8v5.20.9v5.21.0v5.21.0-beta.1v5.21.0-rc.1v5.21.1v5.21.2v5.21.3v5.21.4v5.22.0v5.22.1v5.22.2v5.22.3v5.22.4v5.22.5v5.22.6v5.22.7v5.22.8 |
5.22.9 |
php-adodbMageia:9 |
before 5.22.9-1.mga9 | 5.22.9-1.mga9 |
libphp-adodbUbuntu:Pro:16.04:LTS |
All versions, plus listed versions 5.18a-15.20.1-15.20.2-15.20.2-25.20.3-15.20.3-1ubuntu15.20.3-1ubuntu1+esm15.20.3-1ubuntu1+esm2 |
None known |
libphp-adodbUbuntu:Pro:20.04:LTS |
All versions, plus listed versions 5.20.14-15.20.15-15.20.16-15.20.16-1ubuntu0.1~esm15.20.16-1ubuntu0.1~esm2 |
None known |
libphp-adodbUbuntu:Pro:22.04:LTS |
All versions, plus listed versions 5.20.19-15.20.19-1ubuntu0.15.20.19-1ubuntu0.1+esm1 |
None known |
Show 4 moreShow less
| Package | Affected | Fixed |
|---|---|---|
libphp-adodbUbuntu:Pro:24.04:LTS |
All versions, plus listed versions 5.21.4-15.21.4-1ubuntu0.1~esm1 |
None known |
libphp-adodbUbuntu:25.10 |
before 5.22.9-0.1, plus listed versions 5.22.8-0.1 |
5.22.9-0.1 |
libphp-adodbUbuntu:26.04:LTS |
before 5.22.9-0.1 | 5.22.9-0.1 |
libphp-adodbUbuntu:25.04 |
before 5.22.8-0.1ubuntu0.1, plus listed versions 5.22.7-0.15.22.8-0.1 |
5.22.8-0.1ubuntu0.1 |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-02 | created | CVE List, EUVD, GitHub Advisories, NVD, OSV |
References
github.com/ADOdb/ADOdb/security/advisories/GHSA-8x27-jwjr-8545
github.com/ADOdb/ADOdb/issues/1070
github.com/ADOdb/ADOdb/commit/11107d6d6e5160b62e05dff8a3a2678cf0e3a426
xaliom.blogspot.com/2025/05/from-sast-to-cve-2025-46337.html
lists.debian.org/debian-lts-announce/2025/05/msg00029.html
nvd.nist.gov/vuln/detail/CVE-2025-46337
Show 10 moreShow less
github.com/advisories/GHSA-8x27-jwjr-8545
github.com/CVEProject/cvelistV5/tree/main/cves/2025/46xxx/CVE-2025-46337.json
security-tracker.debian.org/tracker/CVE-2025-46337
github.com/ADOdb/ADOdb
advisories.mageia.org/MGASA-2025-0179.html
bugs.mageia.org/show_bug.cgi?id=34339
ubuntu.com/security/notices/USN-7530-1
github.com/ADOdb/ADOdb/releases/tag/v5.22.9
ubuntu.com/security/CVE-2025-46337
cve.org/CVERecord?id=CVE-2025-46337