{"id":"CVE-2025-46337","aliases":["DEBIAN-CVE-2025-46337","DLA-4177-1","EUVD-2025-13113","GHSA-8x27-jwjr-8545","MGASA-2025-0179","UBUNTU-CVE-2025-46337","USN-7530-1","USN-7530-2"],"status":"published","title":"SQL injection in ADOdb PostgreSQL driver pg_insert_id() method","description":"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.","severity":{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00756,"percentile":0.55592,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-89"],"published":"2025-05-01T13:59:51Z","modified":"2026-11-05T11:58:23Z","fixes":[{"ecosystem":"Packagist","package":"adodb/adodb-php","fixed_in":["5.22.9"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"libphp-adodb","fixed_in":["5.21.4-1+deb12u1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"libphp-adodb","fixed_in":["5.22.9-0.1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"libphp-adodb","fixed_in":["5.22.9-0.1"],"sources":["osv"]},{"ecosystem":"Debian:11","package":"libphp-adodb","fixed_in":["5.20.19-1+deb11u2"],"sources":["osv"]},{"ecosystem":"Mageia:9","package":"php-adodb","fixed_in":["5.22.9-1.mga9"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:16.04:LTS","package":"libphp-adodb","fixed_in":["5.20.3-1ubuntu1+esm2"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:18.04:LTS","package":"libphp-adodb","fixed_in":["5.20.9-1ubuntu0.1~esm2"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:20.04:LTS","package":"libphp-adodb","fixed_in":["5.20.16-1ubuntu0.1~esm2"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:22.04:LTS","package":"libphp-adodb","fixed_in":["5.20.19-1ubuntu0.1+esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:24.04:LTS","package":"libphp-adodb","fixed_in":["5.21.4-1ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:25.10","package":"libphp-adodb","fixed_in":["5.22.9-0.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:26.04:LTS","package":"libphp-adodb","fixed_in":["5.22.9-0.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:25.04","package":"libphp-adodb","fixed_in":["5.22.8-0.1ubuntu0.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"adodb/adodb-php","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"5.22.8"},{"fixed":"5.22.9"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.21.4-1+deb12u1"}]}],"versions":["5.21.4-1"]},{"source":"osv","ecosystem":"Debian:13","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.22.9-0.1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.22.9-0.1"}]}]},{"source":"osv","ecosystem":"Debian:11","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.20.19-1+deb11u2"}]}],"versions":["5.20.19-1","5.20.19-1+deb11u1"]},{"source":"osv","ecosystem":"Packagist","package":"adodb/adodb-php","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.22.9"}]}],"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"]},{"source":"osv","ecosystem":"Mageia:9","package":"php-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.22.9-1.mga9"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.20.3-1ubuntu1+esm2"}]}],"versions":["5.18a-1","5.20.1-1","5.20.2-1","5.20.2-2","5.20.3-1","5.20.3-1ubuntu1","5.20.3-1ubuntu1+esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.20.9-1ubuntu0.1~esm2"}]}],"versions":["5.20.9-1","5.20.9-1ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.20.16-1ubuntu0.1~esm2"}]}],"versions":["5.20.14-1","5.20.15-1","5.20.16-1","5.20.16-1ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.20.19-1ubuntu0.1+esm1"}]}],"versions":["5.20.19-1","5.20.19-1ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.21.4-1ubuntu0.1~esm1"}]}],"versions":["5.21.4-1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.22.9-0.1"}]}],"versions":["5.22.8-0.1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.22.9-0.1"}]}]},{"source":"osv","ecosystem":"Ubuntu:25.04","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.22.8-0.1ubuntu0.1"}]}],"versions":["5.22.7-0.1","5.22.8-0.1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.20.3-1ubuntu1+esm2"}]}],"versions":["5.18a-1","5.20.1-1","5.20.2-1","5.20.2-2","5.20.3-1","5.20.3-1ubuntu1","5.20.3-1ubuntu1+esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.20.9-1ubuntu0.1~esm2"}]}],"versions":["5.20.9-1","5.20.9-1ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.20.16-1ubuntu0.1~esm2"}]}],"versions":["5.20.14-1","5.20.15-1","5.20.16-1","5.20.16-1ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.20.19-1ubuntu0.1+esm1"}]}],"versions":["5.20.19-1","5.20.19-1ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"libphp-adodb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.21.4-1ubuntu0.1~esm1"}]}],"versions":["5.21.4-1"]}],"products":[{"vendor":"adodb","product":"adodb"}],"references":[{"url":"https://github.com/ADOdb/ADOdb/security/advisories/GHSA-8x27-jwjr-8545","tags":["x_refsource_CONFIRM","advisory","web","report"]},{"url":"https://github.com/ADOdb/ADOdb/issues/1070","tags":["x_refsource_MISC","report","web"]},{"url":"https://github.com/ADOdb/ADOdb/commit/11107d6d6e5160b62e05dff8a3a2678cf0e3a426","tags":["x_refsource_MISC","fix","web","report"]},{"url":"https://xaliom.blogspot.com/2025/05/from-sast-to-cve-2025-46337.html","tags":["article","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00029.html","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-46337","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-8x27-jwjr-8545"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/46xxx/CVE-2025-46337.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2025-46337","tags":["advisory"]},{"url":"https://github.com/ADOdb/ADOdb","tags":["package"]},{"url":"https://advisories.mageia.org/MGASA-2025-0179.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=34339","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-7530-1","tags":["advisory"]},{"url":"https://github.com/ADOdb/ADOdb/releases/tag/v5.22.9","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2025-46337","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-46337","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-7530-2","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2025-46337","title":"SQL injection in ADOdb PostgreSQL driver pg_insert_id() method","description":"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.","status":"published","published":"2025-05-01T17:20:10.658Z","modified":"2025-05-26T18:03:45.346Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L","level":"critical","assessor":"cna"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:32:36.706507Z"}],"euvd":[{"id":"EUVD-2025-13113","description":"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.","status":"published","published":"2025-05-01T17:20:10Z","modified":"2025-05-26T18:03:45Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L","level":"critical"}],"updated_at":"2026-11-02T20:32:38.869898Z"}],"ghsa":[{"id":"GHSA-8x27-jwjr-8545","title":"SQL injection in ADOdb PostgreSQL driver pg_insert_id() method","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.","status":"published","published":"2025-05-01T13:59:51Z","modified":"2025-05-26T18:30:25Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:38:44.991725Z"}],"nvd":[{"id":"CVE-2025-46337","description":"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.","status":"published","published":"2025-05-01T18:15:57.51Z","modified":"2026-06-17T09:26:15.62Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L","level":"critical","assessor":"secondary"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:11:04.33372Z"}],"osv":[{"id":"CVE-2025-46337","title":"SQL injection in ADOdb PostgreSQL driver pg_insert_id() method","description":"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.","status":"published","published":"2025-05-01T17:20:10.658Z","modified":"2026-10-28T02:30:26.8651141Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:44:49.707645Z"},{"id":"DEBIAN-CVE-2025-46337","description":"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.","status":"published","published":"2025-05-01T18:15:57.51Z","modified":"2026-09-01T20:05:52.911031641Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L","level":"critical"}],"updated_at":"2026-11-02T15:45:47.378563Z"},{"id":"GHSA-8x27-jwjr-8545","title":"SQL injection in ADOdb PostgreSQL driver pg_insert_id() method","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.","status":"published","published":"2025-05-01T13:59:51Z","modified":"2025-05-26T18:46:40.89322Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:46:42.78452Z"},{"id":"UBUNTU-CVE-2025-46337","description":"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.","status":"published","published":"2025-05-01T18:15:00Z","modified":"2026-11-04T20:12:40.191675408Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L","level":"critical"}],"updated_at":"2026-11-04T21:43:00.432648Z"},{"id":"DLA-4177-1","title":"libphp-adodb - security update","status":"published","published":"2025-05-24T00:00:00Z","modified":"2026-03-09T02:08:29.703325Z","updated_at":"2026-11-02T15:46:12.7027Z"},{"id":"MGASA-2025-0179","title":"Updated php-adodb packages fix security vulnerability","description":"ADOdb is a PHP database class library that provides abstractions for\nperforming queries and managing databases. Prior to version 5.22.9,\nimproper escaping of a query parameter may allow an attacker to execute\narbitrary SQL statements when the code using ADOdb connects to a\nPostgreSQL database and calls pg_insert_id() with user-supplied data.\nThis issue has been patched in version 5.22.9 - CVE-2025-46337.\n","status":"published","published":"2025-06-08T06:22:31Z","modified":"2026-04-16T04:43:01.356934949Z","updated_at":"2026-11-02T15:49:43.178336Z"},{"id":"USN-7530-1","title":"libphp-adodb vulnerability","description":"It was discovered that ADOdb incorrectly handled SQL input. A remote\nattacker could use this issue to execute arbitrary SQL commands.","status":"published","published":"2025-05-29T13:43:45.495121Z","modified":"2026-02-04T04:35:49.470622Z","updated_at":"2026-11-02T16:58:19.988474Z"},{"id":"USN-7530-2","title":"libphp-adodb vulnerability","description":"USN-7530-1 fixed a vulnerability in ADOdb. This update provides the\ncorresponding updates for Ubuntu 16.04 LTS, Ubuntu 18.04 LTS,\nUbuntu 20.04 LTS, Ubuntu 22.04 LTS, and Ubuntu 24.04 LTS.\n\nOriginal advisory details:\n\n It was discovered that ADOdb incorrectly handled SQL input. A remote\n attacker could use this issue to execute arbitrary SQL commands.","status":"published","published":"2026-11-04T15:14:52Z","modified":"2026-11-05T11:58:23.842640239Z","updated_at":"2026-11-05T13:30:00.949926Z"}]}}
