{"vuln_id":"CVE-2025-1094","aliases":[],"description":"Improper neutralization of quoting syntax in PostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() allows a database input provider to achieve SQL injection in certain usage patterns.  Specifically, SQL injection requires the application to use the function result to construct input to psql, the PostgreSQL interactive terminal.  Similarly, improper neutralization of quoting syntax in PostgreSQL command line utility programs allows a source of command line arguments to achieve SQL injection when client_encoding is BIG5 and server_encoding is one of EUC_TW or MULE_INTERNAL.  Versions before PostgreSQL 17.3, 16.7, 15.11, 14.16, and 13.19 are affected.","published_at":"2025-02-13T13:15:09.130000Z","modified_at":"2026-11-03T22:17:33.650000Z","first_seen_at":"2026-11-22T14:05:37.614106Z","severity":"high","severity_source":"nvd","cvss_score":8.1,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","cwe":["CWE-149"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.84839,"epss_percentile":0.99716,"nvd_status":"Deferred","enriched_at":"2026-11-22T14:21:10.742903Z","links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2025-1094"},"matched_alias":null,"items":[{"id":12653,"source":{"id":"gh-php-src","name":"PHP releases (GitHub php/php-src tags)"},"title":"GHSA-hrwm-9436-5mv3 / CVE-2025-1735: pgsql extension does not check for errors during escaping","summary":"pgsql extension does not check for errors during escaping\n\n### Summary\r\n\r\nMissing error checking could result in SQL injection and missing error handling could lead to crashes due to null pointer dereferences.\r\n\r\n### Details\r\n\r\nThis is related to https://www.postgresql.org/support/security/CVE-2025-1094/ that was reported to postgres.  The reporter used php to showcase the problem.\r\n\r\nWhile working on addressing the report, it was realised that PHP uses the escape functions in a way that does not allow for errors to be reported. Specifically the error parameters is not passed to PQescapeStringConn(), which therefore cannot report an error.\r\n\r\nWhile postgres now tries to make sure that the escaped string will trigger errors on the server-side if the string is invalidly encoded, that still can be insufficient, depending on how the escaped values are used.\r\n\r\nIt was also noted that several calls to PQescapeIdentifier() do not check for the returned value being NULL, despite that being the documented way that PQescapeIdentifier() (and PQescapeLiteral()) to report errors.  Seems like that could cause crashes or at least UB in some of the callsites.\nPatched:  8.1.33,  8.2.29,  8.3.23,  8.4.10","url":"https://github.com/php/php-src/security/advisories/GHSA-hrwm-9436-5mv3","published_at":"2025-07-03T12:27:50Z","updated_at":"2025-07-03T12:27:50Z","fetched_at":"2026-11-22T14:05:37.431189Z","severity":"high","cvss_score":8.1,"epss":0.84839,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php-src","vuln_id":"CVE-2025-1735","vuln_ids":["CVE-2025-1094","CVE-2025-1220","CVE-2025-1735","CVE-2025-6491","GHSA-HRWM-9436-5MV3"],"tags":["repo-advisory","security","repo:php/php-src","stack"],"cluster_id":11761,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12653","html":"https://vulnwatch.ve1ve2.com/item/12653"}}]}