PoC Monitor
← All CVEs
CVE-2025-1094published 13 Feb 2025 13:00 UTCData: JSON · API

PostgreSQL

PostgreSQL quoting APIs miss neutralizing quoting syntax in text that fails encoding validation

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.

First public PoC 0 h beforebefore publication · 13 Feb 2025 · Metasploit
Public PoCs65 on GitHub · 1 Exploit-DB, Metasploit or nuclei
CVSS8.1high · scored by CNA · CWE-149
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

n/a PostgreSQL
  • >= 17, < 17.3
  • >= 16, < 16.7
  • >= 15, < 15.11
  • >= 14, < 14.16
  • < 13.19

Fixed in 17.3, 16.7, 15.11, 14.16, 13.19

Mitigation

Upgrade PostgreSQL to 17.3 or 16.7 or 15.11 or 14.16 or 13.19 or later.

Workaround

Confirm input passes encoding validation before quoting it.

Timeline

Days relative to CVE publication
-2t=0+2+4+6+8First public PoC13 Feb 2025 · t = 0CVE published13 Feb 2025 · t = 0

First public PoC 0 h before publication; not in CISA KEV. First PoC: Metasploit exploit: BeyondTrust Privileged Remote Access (PRA) and Remote Support (RS) unauthenticated Remote Code Execution (exploit/linux/http/beyondtrust_pra_rs_unauth_rce) (Metasploit, 13 Feb 2025).

PoC repositories

Found on GitHub.

5 PoCs · 2 pending · 2 informational

PoCs 5
RepositoryCreatedStarsAssessment
soltanali0/CVE-2025-1094-Exploit 27 Feb 2025 +14 d 39 PoC
ishwardeepp/CVE-2025-1094-PoC-Postgre-SQLi 14 Mar 2025 +29 d 6 PoC
aninfosec/CVE-2025-1094 18 Jun 2025 +125 d 1 PoC
PinkArmor/CVE-2025-1094-Lab-Setup 19 Oct 2025 +248 d 0 PoC
Flags · score 30
  • README gives an archive password

Below the suspicion threshold (50); does not change the assessment.

TranDongA3/POC-CVE-2025-1094 10 May 2026 +1.2 y 0 PoC
Pending 2
RepositoryCreatedStarsAssessment
B1ack4sh/Blackash-CVE-2025-1094 unknown 0 Pending · repository unavailable (HTTP 404)
shacojx/CVE-2025-1094-Exploit unknown 0 Pending · repository unavailable (HTTP 404)
Informational 2
RepositoryCreatedStarsAssessment
RedTanny/Poc_Automation_vulnerability 9 Nov 2025 +269 d 0 Informational · list
skraft9/CVE-2024-12356 4 Sep 2026 +1.6 y 2 Informational · detection

Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.

Other public exploits

Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.

PoC characteristics

What to hunt for in your logs · from 5 PoC repos

POST /vuln-endpoint

Body markers
input=" input=""SELECT lo_export( (SELECT convert_from(pg_read_file('/etc/passwd'), 'UTF8')), '/tmp/payload' ) in application/x-www-form-urlencoded
Ports
5000
Seen in
2 repos: ishwardeepp/CVE-2025-1094-PoC-Postgre-SQLi, soltanali0/CVE-2025-1094-Exploit
Evidence
ishwardeepp/CVE-2025-1094-PoC-Postgre-SQLi/files/cve-2025-1094-exploit.py:18 soltanali0/CVE-2025-1094-Exploit/exploit.py:20

POST /search

Body markers
name=hax\xc0'; \! id; \! ls /tmp; # in application/x-www-form-urlencoded
Ports
5000
Seen in
1 repo: TranDongA3/POC-CVE-2025-1094
Evidence
TranDongA3/POC-CVE-2025-1094/exolit.py:14

Regex

Generated from PoC characteristics; not yet reviewed. Matches the request path and query.

POST /vuln-endpoint
(?i)^/vuln-endpoint(?:[?#].*)?$
POST /search
(?i)^/search(?:[?#].*)?$

Suricata

Template generated from PoC characteristics. Review before deploying.

POST /vuln-endpoint
alert http any any -> $HOME_NET [5000] (msg:"GG PoC-Monitor CVE-2025-1094 PostgreSQL exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/vuln-endpoint"; http.request_body; content:"input=|22|"; http.request_body; content:"input=|22||22|SELECT lo_export(
  (SELECT convert_from(pg_read_file('/etc/passwd'), 'UTF8')), 
  '/tmp/payload'
)"; reference:url,poc.griffinguard.io/cve/CVE-2025-1094; classtype:web-application-attack; sid:9092354; rev:1;)
POST /search
alert http any any -> $HOME_NET [5000] (msg:"GG PoC-Monitor CVE-2025-1094 PostgreSQL exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/search"; http.request_body; content:"name=hax|5c|xc0'|3b| |5c|! id|3b| |5c|! ls /tmp|3b| #"; reference:url,poc.griffinguard.io/cve/CVE-2025-1094; classtype:web-application-attack; sid:9894635; rev:1;)

Sigma

Template generated from PoC characteristics. Review before deploying.

POST /vuln-endpoint
title: PostgreSQL exploit attempt (CVE-2025-1094)
id: gg-pocmon-cve-2025-1094-9092354
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-1094. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2025-1094
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/vuln-endpoint'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: high
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2025.1094
POST /search
title: PostgreSQL exploit attempt (CVE-2025-1094)
id: gg-pocmon-cve-2025-1094-9894635
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-1094. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2025-1094
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/search'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: high
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2025.1094