GitHub Advisoryadvisory · Packagist

GHSA-8x27-jwjr-8545 SQL injection in ADOdb PostgreSQL driver pg_insert_id() method

CRITICAL Published 2025-05-01 Modified 2025-05-26 Official page ↗
Aliases
CVE-2025-46337
Ecosystem
Packagist
Packages
adodb/adodb-php
Severity
Critical
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L
Weaknesses
CWE-89
Reviewed
2025-05-01

Affected packages

• Packagist adodb/adodb-php: < 5.22.9 → fixed in 5.22.9

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. 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.

Related

Alias · CVE (1)

  • CVE-2025-46337 ADOdb is a PHP database class library that provides abstractions for performing queries and managing databases. vulnerability

Weakness · CWE (1)

  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command weakness

References