GHSA-8x27-jwjr-8545

Suggest an improvement
Source
https://github.com/advisories/GHSA-8x27-jwjr-8545
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/05/GHSA-8x27-jwjr-8545/GHSA-8x27-jwjr-8545.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-8x27-jwjr-8545
Aliases
Published
2025-05-01T13:59:51Z
Modified
2025-05-05T22:21:40.627234Z
Severity
  • 10.0 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L CVSS Calculator
Summary
SQL injection in ADOdb PostgreSQL driver pg_insert_id() method
Details

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

Patches

Vulnerability is fixed in ADOdb 5.22.9 (11107d6d6e5160b62e05dff8a3a2678cf0e3a426).

Workarounds

Only pass controlled data to pginsertid() method's $fieldname parameter, or escape it with pgescapeidentifier() 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.

Database specific
{
    "nvd_published_at": "2025-05-01T18:15:57Z",
    "cwe_ids": [
        "CWE-89"
    ],
    "severity": "CRITICAL",
    "github_reviewed": true,
    "github_reviewed_at": "2025-05-01T13:59:51Z"
}
References

Affected packages

Packagist / adodb/adodb-php

Package

Name
adodb/adodb-php
Purl
pkg:composer/adodb/adodb-php

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.22.9

Affected versions

v5.*

v5.19
v5.20.0
v5.20.1
v5.20.2
v5.20.3
v5.20.4
v5.20.5
v5.20.6
v5.20.7
v5.20.8
v5.20.9
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.20
v5.20.21
v5.21.0-beta.1
v5.21.0-rc.1
v5.21.0
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

Database specific

{
    "last_known_affected_version_range": "<= 5.22.8"
}