Loading...
Skip to main content

CVE-2025-46337 — SQL injection in adodb/adodb-php — CVE Details

CRITICAL

SQL injection in ADOdb PostgreSQL driver pg_insert_id() method

Published May 1, 2025Updated May 26, 2025Source: osv

Summary

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](https://xaliom.blogspot.com/2025/05/from-sast-to-cve-2025-46337.html) by Marco Nappi ### Credits Thanks to Marco Nappi (@mrcnpp) for reporting this vulnerability.

Advisory Timeline

  • First published May 1, 2025 (529 days ago).
  • Last revised May 26, 2025 — 25 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update adodb/adodb-php to 5.22.9 or later
composer require "adodb/adodb-php:^5.22.9"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: packagist (1).

PackageEcosystemAffectedFixed In
adodb/adodb-php
packagist
v5.19, v5.20.0, v5.20.1, v5.20.10 (+35 more)5.22.9

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
Low

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L

Frequently Asked Questions

What is CVE-2025-46337?
SQL injection in ADOdb PostgreSQL driver pg_insert_id() method This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 10.0/10).
How do I check if my project is affected by CVE-2025-46337?
CVE-2025-46337 affects adodb/adodb-php. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-46337 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
10.0

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-8x27-jwjr-8545

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies