目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336

100%

CVE-2026-12044— pgAdmin 4 输出处理不当漏洞

一分钟漏洞结论

影响对象
pgadmin.org pgAdmin 4
利用判断
存在公开或 AI PoC,应优先验证
建议动作
优先检查厂商安全公告和参考链接中的修复版本;无法立即升级时,限制受影响服务暴露并加强监测。

pgadmin.org pgAdmin 4是pgadmin.org组织的数据库管理工具。 pgAdmin 4 1.0版本至9.16之前版本存在安全漏洞,该漏洞源于在使用用户提供的描述字段时,直接将描述内容插入SQL字面量中而未使用qtLiteral转义过滤器进行清理,可能导致具有创建或修改受影响对象类型权限的已认证用户通过提交包含单引号的描述内容突破字面量并链接任意SQL语句。

CVSS 8.8 · High EPSS 0.71% · P50

影响版本矩阵 1

厂商产品 版本范围状态
pgadmin.org pgAdmin 4 1.0< 9.16 affected
获取后续新漏洞提醒 登录后订阅

一、 漏洞 CVE-2026-12044 基础信息

漏洞信息

对漏洞内容有疑问?看看神龙的深度分析是否有帮助!
查看神龙十问 ↗

尽管我们使用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。神龙努力确保数据的准确性,但请您根据实际情况进行核实和判断。

Vulnerability Title
pgAdmin 4: SQL injection in COMMENT ON ... IS '<description>' rendering across dialog templates
来源: CVE Program / CVE List V5
Vulnerability Description
SQL injection in pgAdmin 4 across every dialog template that renders ``COMMENT ON ... IS '<description>'`` for a user-supplied description field. The Jinja templates for Domains (and their constraints), Foreign Tables, Languages, and Event Triggers, plus the Views OID-lookup query, interpolated the description directly inside a single-quoted SQL literal -- ``'{{ data.description }}'`` -- instead of passing it through the ``qtLiteral`` escape filter. An authenticated pgAdmin user with permission to create or alter the affected object types could submit a description containing an apostrophe, break out of the literal and chain arbitrary SQL. The injected SQL runs under the PostgreSQL role the user is already authenticated as; for a connected role with ``COPY ... TO/FROM PROGRAM`` (typically PostgreSQL superuser), this chains to OS command execution on the PostgreSQL host. The defect does not cross a privilege boundary -- the user already has direct SQL access to that role through pgAdmin's Query Tool -- so the attacker gains no capability beyond what their database role already grants. The marginal impact captures bypass of any application-layer Query Tool gating an operator may have configured. The defect was originally reported against the Domain Dialog ``description`` field; a code-wide audit identified sixteen sites of the same pattern across the templates listed above. The same review also surfaced ten related sinks in the pgstattuple/pgstatindex stats templates -- ``pgstattuple('{{schema}}.{{table}}')`` and the matching pgstatindex shape -- where ``qtIdent`` escapes embedded double quotes inside the identifier but not apostrophes, so a user with CREATE privilege on a schema could plant a table or index named ``foo'bar`` and a later stats viewer would render an unbalanced literal. Fix is layered: 1. Sites: replace every ``'{{ x.description }}'`` with ``{{ x.description|qtLiteral(conn) }}`` (no surrounding quotes -- the filter wraps the value in escaped quotes itself). Plumb ``conn=self.conn`` through every ``render_template`` call that loads one of these templates. Also corrects a ``{ % elif`` Jinja typo in the foreign-table schema diff (dead branch). Rewrite the ten pgstattuple/pgstatindex stats sites to address the relation via OID + ``::oid::regclass`` cast (e.g. ``pgstattuple({{ tid }}::oid::regclass)``), eliminating the embedded literal-call form entirely so that bug-class can no longer recur there. 2. Driver hardening: ``qtLiteral`` (in ``utils/driver/psycopg3/__init__.py``) used to silently return the raw unescaped value when its ``conn`` argument was falsy. It now raises ``ValueError`` -- surfacing the entire bug class going forward. The change immediately uncovered eight latent plumbing bugs (in ``schemas/__init__.py``, ``schemas/functions/__init__.py``, ``schemas/tables/utils.py``, ``foreign_servers/__init__.py``, and seven sites in ``roles/__init__.py``) -- all fixed as part of this patch. The inner ``except`` block that swallowed adapter-level failures and returned the raw value is also removed, so unadaptable inputs raise instead of leaking unescaped values. 3. Regression tests: a per-template behavioural test renders each previously-vulnerable template with an apostrophe-injection payload and asserts the escaped fragment is present and the vulnerable fragment absent; a lint test walks every ``*.sql`` template flagging any ``'{{ ... }}'`` single-quote-wrapped interpolation against an explicit allowlist; unit tests cover the new qtLiteral fail-fast and inner-except raise paths. This issue affects pgAdmin 4: from 1.0 before 9.16.
来源: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
来源: CVE Program / CVE List V5
Vulnerability Type
SQL命令中使用的特殊元素转义处理不恰当(SQL注入)
来源: CVE Program / CVE List V5
Vulnerability Title
pgAdmin 4 输出处理不当漏洞
来源: 中国国家信息安全漏洞库 CNNVD
Vulnerability Description
pgadmin.org pgAdmin 4是pgadmin.org组织的数据库管理工具。 pgAdmin 4 1.0版本至9.16之前版本存在安全漏洞,该漏洞源于在使用用户提供的描述字段时,直接将描述内容插入SQL字面量中而未使用qtLiteral转义过滤器进行清理,可能导致具有创建或修改受影响对象类型权限的已认证用户通过提交包含单引号的描述内容突破字面量并链接任意SQL语句。
来源: 中国国家信息安全漏洞库 CNNVD
CVSS Information
N/A
来源: 中国国家信息安全漏洞库 CNNVD
Vulnerability Type
N/A
来源: 中国国家信息安全漏洞库 CNNVD

受影响产品

厂商 产品 影响版本 CPE 订阅
pgadmin.org pgAdmin 4 1.0 ~ 9.16 -

二、漏洞 CVE-2026-12044 的公开POC

# POC 描述 源链接 神龙链接
AI 生成 POC 已实测靶场 高级
Qwen3.6-35B-A3B · 4861 chars
Pro+ 专属包含:
漏洞复现靶场录像(真实沙箱构建 + 触发,独家)
漏洞原理深度分析
触发条件与影响面
完整可执行 POC 代码
利用链与缓解建议
POC 打包下载
每月 100+ 条 AI 生成额度

三、漏洞 CVE-2026-12044 的情报信息

登录查看更多情报信息。

同批安全公告 · pgadmin.org · 2026-06-18 · 共 7 条

CVE-2026-12048 9.3 CRITICAL pgadmin 4 输出处理不当漏洞
CVE-2026-12045 9.0 CRITICAL pgAdmin 4 命令注入漏洞
CVE-2026-12046 9.0 CRITICAL pgadmin 4 授权问题漏洞
CVE-2026-12049 4.3 MEDIUM pgAdmin 4 输入验证错误漏洞
CVE-2026-12050 4.3 MEDIUM pgadmin 4 SQL注入漏洞
CVE-2026-12047 3.5 LOW pgadmin 4 输出处理不当漏洞

IV. Related Vulnerabilities

V. Comments for CVE-2026-12044

暂无评论


发表评论