{"id":"CVE-2025-46337","aliases":["CVE-2025-46337","GHSA-8x27-jwjr-8545"],"related":[],"kind":"vulnerability","state":"published","title":"SQL injection in ADOdb PostgreSQL driver pg_insert_id() method","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"ADOdb es una librería de clases de bases de datos PHP que proporciona abstracciones para realizar consultas y administrar bases de datos. Antes de la versión 5.22.9, el escape incorrecto de un parámetro de consulta podía permitir que un atacante ejecutara sentencias SQL arbitrarias cuando el código que usa ADOdb se conecta a una base de datos PostgreSQL e invoca pg_insert_id() con datos proporcionados por el usuario. Este problema se ha corregido en la versión 5.22.9.","source":"nvd"}],"published":"2025-05-01T13:59:51.000Z","modified":"2026-06-17T09:26:15.620Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L","score":10,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L","score":10,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L","score":10,"rating":"CRITICAL"}],"cwes":["CWE-89"],"affected":[{"ranges":[{"version":"< 5.22.9","status":"affected"}],"vendor":"ADOdb","product":"ADOdb","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.22.9"}],"ecosystem":"Packagist","package":"adodb/adodb-php","purl":"pkg:composer/adodb/adodb-php","source":"ghsa"}],"references":[{"url":"https://github.com/ADOdb/ADOdb/security/advisories/GHSA-8x27-jwjr-8545","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ADOdb/ADOdb/issues/1070","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ADOdb/ADOdb/commit/11107d6d6e5160b62e05dff8a3a2678cf0e3a426","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://xaliom.blogspot.com/2025/05/from-sast-to-cve-2025-46337.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00029.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-46337","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ADOdb/ADOdb","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2025-05-02T17:57:27.460Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-46337","url":"https://www.cve.org/CVERecord?id=CVE-2025-46337","licence":"CVE Terms of Use","modified":"2025-05-26T18:03:45.346Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8x27-jwjr-8545","url":"https://github.com/advisories/GHSA-8x27-jwjr-8545","licence":"CC-BY-4.0","modified":"2025-05-26T18:46:40.893Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-46337","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-46337","licence":"Public domain","modified":"2026-06-17T09:26:15.620Z"}],"updatedAt":"2026-11-25T22:58:57.368Z","epss":{"score":0.00764,"percentile":0.56672,"date":"2026-12-02T12:00:21.000Z"}}