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

目标: 1000 元 · 已筹: 1336

100%

CVE-2026-76904 PoC — GeoTools PostGIS层JSON数组存在未授权SQL注入漏洞

来源
关联漏洞
标题: GeoTools PostGIS层JSON数组存在未授权SQL注入漏洞 (CVE-2026-76904)
Description:GeoTools 是一个开源的 Java 库,提供用于处理地理空间数据的工具。从版本 30.5 起,至版本 33.6、34.5 和 33.6(原文中 33.6 重复出现,疑为笔误)之前的版本中,当使用 PostGIS DataStore 实现执行 OGC 过滤器时,存在一个 SQL 注入漏洞,具体涉及 `jsonArrayContains` 函数。该漏洞要求在 PostGIS 12 或更高版本环境下,且数据库表中包含字符串(String)或 JSON 类型字段。 在 PostGIS 12 及更高版本中,`jsonArrayContains(<column>, <pointer>, <value>)` 函数会将 `<value>` 参数直接写入生成的 SQL 语句中,而未进行任何转义处理,从而可能导致 SQL 注入攻击。 相关补丁已在版本 33.6、34.5 以及另一个 33.6(可能应为其他版本号,建议核实)中提供。目前暂无已知的工作绕行方案(workaround)。 为限制 SQL 注入的影响范围,建议将 PostGIS 连接池配置为仅具有最小必要权限的用户账户。
Description
GeoServer is an open source software server written in Java that allows users to share and edit geospatial data. GeoTools FilterToSqlHelper.constructEquality writes the expected argument of the jsonArrayContains CQL function RAW into the SQL string while only escaping the JSON pointer. A single quote in the value parameter breaks out of the PostgreSQL jsonb_path_exists string literal, enabling unauthenticated SQL injection. When the PostGIS backend runs with superuser privileges, the injection escalates to operating system command execution through PostgreSQL COPY TO PROGRAM. Users are advised to upgrade to either version 2.21.4, or version 2.22.2 to resolve this issue. Users unable to upgrade should enable the PostGIS DataStore preparedStatements setting and disable encode functions as a workaround.
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →