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

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.99%). Schedule for your next planned update.

Does your project use an affected adodb/adodb-php version?

Paste your composer.lock to check it for CVE-2025-46337 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my composer.lock

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

Credits

Thanks to Marco Nappi (@mrcnpp) for reporting this vulnerability.

Advisory Timeline

  • First published May 1, 2025 (574 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, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: Packagist (1).

PackageFixed In
adodb/adodb-php Packagist · Affected: 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. It has a 1.0% probability of exploitation within 30 days (EPSS score). 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

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
0.99%
EPSS percentile: 61.2

This is an above-median EPSS score — 61.2% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

GHSA-8x27-jwjr-8545

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my composer.lock