# PostgreSQL quoting APIs 在遇到编码验证失败的文本时,会忽略中和引用语法
## 漏洞概述
PostgreSQL中的libpq函数(`PQescapeLiteral()`、`PQescapeIdentifier()`、`PQescapeString()`、`PQescapeStringConn()`)和命令行工具未正确中和引用语法,导致在某些使用模式下可能发生SQL注入。
## 影响版本
- PostgreSQL 17.3之前的版本
- PostgreSQL 16.7之前的版本
- PostgreSQL 15.11之前的版本
- PostgreSQL 14.16之前的版本
- PostgreSQL 13.19之前的版本
## 细节
- 当应用程序使用这些函数的结果构造输入供PostgreSQL交互终端`psql`使用时,会产生SQL注入漏洞。
- 在客户端编码为`BIG5`,服务器编码为`EUC_TW`或`MULE_INTERNAL`时,PostgreSQL命令行工具的命令行参数在未正确中和引用语法的情况下会产生SQL注入漏洞。
## 影响
该漏洞允许数据库输入提供者通过注入恶意SQL语句来操纵数据库查询,进而可能导致数据泄露或损坏。受影响版本的PostgreSQL用户应尽快升级到修补的版本。
# | POC 描述 | 源链接 | 神龙链接 |
---|---|---|---|
1 | WebSocket and SQL Injection Exploit Script | https://github.com/soltanali0/CVE-2025-1094-Exploit | POC详情 |
2 | CVE-2025-1094 Exploit SQL Injection to RCE via WebSocket in PostgreSQL | https://github.com/shacojx/CVE-2025-1094-Exploit | POC详情 |
3 | None | https://github.com/ishwardeepp/CVE-2025-1094-PoC-Postgre-SQLi | POC详情 |
4 | It is an input sanitization flaw caused by an encoding mismatch, allowing crafted input to bypass filters. If a server is vulnerable, an attacker can inject malicious SQL that the backend executes. | https://github.com/aninfosec/CVE-2025-1094 | POC详情 |
5 | CVE-2025-1094 | https://github.com/B1ack4sh/Blackash-CVE-2025-1094 | POC详情 |
标题: PostgreSQL: CVE-2025-1094: PostgreSQL quoting APIs miss neutralizing quoting syntax in text that fails encoding validation -- 🔗来源链接
标签:
暂无评论