{"id":"GHSA-8x27-jwjr-8545","aliases":["CVE-2025-46337"],"title":"SQL injection in ADOdb PostgreSQL driver pg_insert_id() method","titleSource":"OSV","descriptionSource":"OSV","declaredSeverity":"CRITICAL","description":"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.\n\nNote that the indicated Severity corresponds to a worst-case usage scenario.\n\n### Impact\nPostgreSQL drivers (postgres64, postgres7, postgres8, postgres9).\n\n### Patches\nVulnerability is fixed in ADOdb 5.22.9 (11107d6d6e5160b62e05dff8a3a2678cf0e3a426).\n\n### Workarounds\nOnly pass controlled data to pg_insert_id() method's $fieldname parameter, or escape it with pg_escape_identifier() first.\n\n### References\n- Issue https://github.com/ADOdb/ADOdb/issues/1070\n- [Blog post](https://xaliom.blogspot.com/2025/05/from-sast-to-cve-2025-46337.html) by Marco Nappi\n\n### Credits\nThanks to Marco Nappi (@mrcnpp) for reporting this vulnerability.","severity":"critical","score":10,"published":"2025-05-01T13:59:51.000Z","modified":"2025-05-26T18:46:40.893Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"Packagist","name":"adodb/adodb-php","sources":[{"name":"OSV · GHSA-8x27-jwjr-8545","url":"https://osv.dev/vulnerability/GHSA-8x27-jwjr-8545"}],"ranges":[{"events":[{"introduced":"0"},{"fixed":"5.22.9"}],"type":"ECOSYSTEM"}],"versions":["v5.19","v5.20.0","v5.20.1","v5.20.10","v5.20.11","v5.20.12","v5.20.13","v5.20.14","v5.20.15","v5.20.16","v5.20.17","v5.20.18","v5.20.19","v5.20.2","v5.20.20","v5.20.21","v5.20.3","v5.20.4","v5.20.5","v5.20.6","v5.20.7","v5.20.8","v5.20.9","v5.21.0","v5.21.0-beta.1","v5.21.0-rc.1","v5.21.1","v5.21.2","v5.21.3","v5.21.4","v5.22.0","v5.22.1","v5.22.2","v5.22.3","v5.22.4","v5.22.5","v5.22.6","v5.22.7","v5.22.8"],"fixed":["5.22.9"]}],"sourceAffected":[],"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"],"sources":[{"name":"OSV","id":"GHSA-8x27-jwjr-8545","modified":"2025-05-26T18:46:40.893220Z","url":"https://osv.dev/vulnerability/GHSA-8x27-jwjr-8545"}],"assessments":[{"source":"OSV","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L","score":10}],"products":[],"remediation":[],"kev":{"status":"not-listed","checkedAt":"2026-10-28T18:20:33.032Z"},"coverage":[{"source":"NVD","status":"not-checked"},{"source":"GHSA","status":"not-checked"},{"source":"EUVD","status":"not-checked"},{"source":"EPSS","status":"not-checked"}],"evidence":[]}