GHSA-8X27-JWJR-8545

Vulnerability from github – Published: 2025-05-01 13:59 – Updated: 2025-05-26 18:30
VLAI
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 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.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 5.22.8"
      },
      "package": {
        "ecosystem": "Packagist",
        "name": "adodb/adodb-php"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "5.22.9"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-46337"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-89"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-05-01T13:59:51Z",
    "nvd_published_at": "2025-05-01T18:15:57Z",
    "severity": "CRITICAL"
  },
  "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 pg_insert_id() with user-supplied data.\n\nNote that the indicated Severity corresponds to a worst-case usage scenario.\n\n### Impact\nPostgreSQL drivers (postgres64, postgres7, postgres8, postgres9).\n\n### Patches\nVulnerability is fixed in ADOdb 5.22.9 (11107d6d6e5160b62e05dff8a3a2678cf0e3a426).\n\n### Workarounds\nOnly pass controlled data to pg_insert_id() method\u0027s $fieldname parameter, or escape it with pg_escape_identifier() first.\n\n### References\n- Issue https://github.com/ADOdb/ADOdb/issues/1070\n- [Blog post](https://xaliom.blogspot.com/2025/05/from-sast-to-cve-2025-46337.html) by Marco Nappi\n\n### Credits\nThanks to Marco Nappi (@mrcnpp) for reporting this vulnerability.",
  "id": "GHSA-8x27-jwjr-8545",
  "modified": "2025-05-26T18:30:24Z",
  "published": "2025-05-01T13:59:51Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/ADOdb/ADOdb/security/advisories/GHSA-8x27-jwjr-8545"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-46337"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ADOdb/ADOdb/issues/1070"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ADOdb/ADOdb/commit/11107d6d6e5160b62e05dff8a3a2678cf0e3a426"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/ADOdb/ADOdb"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2025/05/msg00029.html"
    },
    {
      "type": "WEB",
      "url": "https://xaliom.blogspot.com/2025/05/from-sast-to-cve-2025-46337.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "SQL injection in ADOdb PostgreSQL driver pg_insert_id() method"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.