{"id":"CVE-2025-1094","published":"2025-02-13T13:00:02Z","modified":"2026-11-03T21:52:48Z","title":"PostgreSQL quoting APIs miss neutralizing quoting syntax in text that fails encoding validation","vendor":null,"product":null,"tier":"core","eol":null,"affectedVersions":[{"vendor":"n/a","product":"PostgreSQL","versions":[">= 17, < 17.3",">= 16, < 16.7",">= 15, < 15.11",">= 14, < 14.16","< 13.19"]}],"workarounds":{"items":["Confirm input passes encoding validation before quoting it."],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-10-16T14:36:36.249886Z","from":"CISA ADP","provenance":"source"},"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"PostgreSQL's libpq escaping functions (PQescapeLiteral, PQescapeIdentifier, PQescapeString and PQescapeStringConn) and its command-line utilities fail to neutralize quoting syntax in text that fails encoding validation, which can enable SQL injection. An attacker who can supply input to the database, or control command-line arguments when client_encoding is BIG5 and server_encoding is EUC_TW or MULE_INTERNAL, can achieve SQL injection, though with the libpq functions this requires the application to pass their output into psql, and the attack is considered high complexity.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-01T01:03:34Z"},"cvss":{"score":8.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.84839,"percentile":0.99716,"date":"2026-11-20","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2025-02-13","exploitedFirstSeen":"2025-02-13","ransomware":false,"evidence":[{"url":"https://www.rapid7.com/blog/post/2025/02/13/cve-2025-1094-postgresql-psql-sql-injection-fixed/","date":"2025-02-13"},{"url":"https://www.loginsoft.com/reports/annually/vulnerability-intelligence-report-2025","date":"2026-01-20"},{"url":"https://www.greynoise.io/blog/reconnaissance-beyondtrust-rce-cve-2026-1731","date":"2026-02-12"}],"evidenceTotal":3,"provenance":"source"},"exploited":true,"otx":{"pulseCount":0,"pulses":[],"provenance":"machine"},"cwes":[{"id":"CWE-149","name":"Improper Neutralization of Quoting Syntax"}],"references":[{"url":"https://www.postgresql.org/support/security/CVE-2025-1094/","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2025/02/msg00015.html","tags":[]},{"url":"http://www.openwall.com/lists/oss-security/2025/02/16/3","tags":[]},{"url":"http://www.openwall.com/lists/oss-security/2025/02/20/1","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2025/02/msg00024.html","tags":[]},{"url":"https://security.netapp.com/advisory/ntap-20250221-0010/","tags":[]}],"techniques":[],"reports":[],"affected":[],"advisories":[],"euvd":{"id":"EUVD-2025-1999","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-1999","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"pocGithub":{"count":4,"skipped":2,"earliest":"2025-02-27","earliestUrl":"https://github.com/soltanali0/CVE-2025-1094-Exploit","repos":[{"name":"soltanali0/CVE-2025-1094-Exploit","url":"https://github.com/soltanali0/CVE-2025-1094-Exploit","stars":39,"created":"2025-02-27"},{"name":"ishwardeepp/CVE-2025-1094-PoC-Postgre-SQLi","url":"https://github.com/ishwardeepp/CVE-2025-1094-PoC-Postgre-SQLi","stars":6,"created":"2025-03-14"},{"name":"skraft9/CVE-2024-12356","url":"https://github.com/skraft9/CVE-2024-12356","stars":2,"created":"2026-09-04"},{"name":"aninfosec/CVE-2025-1094","url":"https://github.com/aninfosec/CVE-2025-1094","stars":1,"created":"2025-06-18"}]},"metasploit":[{"name":"BeyondTrust Privileged Remote Access (PRA) and Remote Support (RS) unauthenticated Remote Code Execution","module":"exploit/linux/http/beyondtrust_pra_rs_unauth_rce","type":"exploit","disclosureDate":"2024-12-16","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/beyondtrust_pra_rs_unauth_rce.rb"}],"first":{"date":"2024-12-16","source":"Metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/beyondtrust_pra_rs_unauth_rce.rb"},"provenance":"source"},"exploitRefs":[],"flow":[],"timeline":[{"date":"2024-12-16","kind":"exploit-public","label":"First public exploit: Metasploit; later: PoC-in-GitHub 2025-02-27","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/beyondtrust_pra_rs_unauth_rce.rb","provenance":"source"},{"date":"2025-02-13","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2025-1094","provenance":"source"},{"date":"2025-02-13","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://www.rapid7.com/blog/post/2025/02/13/cve-2025-1094-postgresql-psql-sql-injection-fixed/","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":"Metasploit","daysToKev":null},"priority":{"score":65.6,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 646 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.94,"detail":"percentile 0.9972"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"4 PoC-in-GitHub repos; 1 Metasploit module"},{"name":"Mentioned in OTX pulses","points":0.0,"detail":"0 pulses"},{"name":"CVSS severity","points":5.67,"detail":"base score 8.1"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}