Skip to content
Heist/ feed
Back to feed
Critical

SQL injection in ADOdb PostgreSQL driver pg_insert_id() method

Type: advisorySources: OSV

ADOdb is a PHP database class library that provides abstractions for performing queries and managing databases. Prior to version 5.22.9, 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. This issue has been patched in version 5.22.9.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-46337
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 07:16 UTC · Revision 1

Source evidence

SQL injection in ADOdb PostgreSQL driver pg_insert_id() method

core-osv · Original source

Published 1 May 2025, 17:20 UTC

ADOdb is a PHP database class library that provides abstractions for performing queries and managing databases. Prior to version 5.22.9, 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. This issue has been patched in version 5.22.9.

osv:CVE-2025-46337
Complete source record
{
  "id": "6d812a255866a72c0d5ac5eed7f931d88ed0f2ee21c726c58e16c0c617a0e84e",
  "url": "https://osv.dev/vulnerability/CVE-2025-46337",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "SQL injection in ADOdb PostgreSQL driver pg_insert_id() method",
    "summary": "ADOdb is a PHP database class library that provides abstractions for performing queries and managing databases. Prior to version 5.22.9, 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. This issue has been patched in version 5.22.9.",
    "evidence": "osv:CVE-2025-46337",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2025-46337",
      "aliases": [
        "CVE-2025-46337",
        "GHSA-8x27-jwjr-8545"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/adodb/adodb",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "a568bfeb72d6b5942df747adc36b95165a083e60"
                },
                {
                  "fixed": "11107d6d6e5160b62e05dff8a3a2678cf0e3a426"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "5.22.9"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "11107d6d6e5160b62e05dff8a3a2678cf0e3a426"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v5.22.8",
            "v5.22.7",
            "v5.22.6",
            "v5.22.5",
            "v5.22.4",
            "v5.22.3",
            "v5.22.2",
            "v5.22.1",
            "v5.22.0",
            "v5.21.0-beta.1",
            "v5.20.0",
            "v5.19",
            "v5.18a",
            "v5.18",
            "v5.17",
            "v5.16a",
            "v5.16",
            "v5.15",
            "v5.14",
            "v5.13",
            "v5.12",
            "v5.11",
            "v5.10",
            "v5.09a",
            "v5.09",
            "v5.08a",
            "v5.08",
            "v5.07",
            "v5.06",
            "v5.05",
            "v5.04",
            "v5.03",
            "v5.02a",
            "v5.02",
            "v5.01beta",
            "v5.00beta"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-46337.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:26.865114100Z",
      "provider": "osv",
      "references": [
        "https://lists.debian.org/debian-lts-announce/2025/05/msg00029.html",
        "https://github.com/ADOdb/ADOdb/security/advisories/GHSA-8x27-jwjr-8545",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/46xxx/CVE-2025-46337.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-46337",
        "https://github.com/ADOdb/ADOdb/issues/1070",
        "https://github.com/ADOdb/ADOdb/commit/11107d6d6e5160b62e05dff8a3a2678cf0e3a426",
        "https://xaliom.blogspot.com/2025/05/from-sast-to-cve-2025-46337.html"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-89"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/46xxx/CVE-2025-46337.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-46337",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 493324,
  "published_at": "2025-05-01T17:20:10.658+00:00"
}