CVE-2025-46337 — SQL injection in adodb/adodb-php — CVE Details
SQL injection in ADOdb PostgreSQL driver pg_insert_id() method
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.99%). Schedule for your next planned update.
Does your project use an affected adodb/adodb-php version?
Paste your composer.lock to check it for CVE-2025-46337 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published May 1, 2025 (574 days ago).
- Last revised May 26, 2025 — 25 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "adodb/adodb-php:^5.22.9"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Packagist (1).
| Package | Fixed In |
|---|---|
| adodb/adodb-php Packagist · Affected: v5.19, v5.20.0, v5.20.1, v5.20.10 (+35 more) | 5.22.9 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-89SQL InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L
References
- https://github.com/ADOdb/ADOdb/security/advisories/GHSA-8x27-jwjr-8545WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-46337ADVISORY
- https://github.com/ADOdb/ADOdb/issues/1070WEB
- https://github.com/ADOdb/ADOdb/commit/11107d6d6e5160b62e05dff8a3a2678cf0e3a426WEB
- https://github.com/ADOdb/ADOdbPACKAGE
- https://lists.debian.org/debian-lts-announce/2025/05/msg00029.htmlWEB
- https://xaliom.blogspot.com/2025/05/from-sast-to-cve-2025-46337.htmlWEB
Frequently Asked Questions
- What is CVE-2025-46337?
- SQL injection in ADOdb PostgreSQL driver pg_insert_id() method. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 10.0/10).
- How do I check if my project is affected by CVE-2025-46337?
- CVE-2025-46337 affects adodb/adodb-php. It has a 1.0% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-46337 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is an above-median EPSS score — 61.2% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-63412CRITICAL
Jane: Instantiation RCE via query parameter name -> raw PHPDoc */ breakout (jane-php/open-api-3)
- CVE-2025-54119CRITICAL
The ADOdb sqlite3 driver allows SQL injection
- CVE-2026-63413CRITICAL
Jane: Instantiation RCE via header parameter name -> raw PHPDoc */ breakout (jane-php/open-api-3)