NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Composer (PHP)

CVE-2025-46337: SQL injection in ADOdb PostgreSQL driver pg_insert_id() method

criticalCVSS 3.1 10.0GHSA-8x27-jwjr-8545

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 pginsertid() with user-supplied data. Note that the indicated Severity corresponds to a worst-case usage scenario. Impact PostgreSQL drivers (postgres64, postgres7, postgres8, postgres9).

Published May 1, 2025 · Updated May 26, 2025

Affected packages

adodb/adodb-php

Ecosystem
Composer (PHP)
Affected
<= 5.22.8
Fixed in
5.22.9
Check
composer show adodb/adodb-php

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to mrcnpp, dregad.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More Composer (PHP) vulnerabilities

All Composer (PHP) entries