Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2026-90885 — 针对 CVE-2026-90885 的可运行概念验证复现程序,该漏洞是 Apache Camel camel-saxon XQuery 中的 XXE(CWE-611),包含 Spring Boot 和 Quarkus 构建以及修复验证。 | Kitploit
工具/GitHubGitHub/oscerd/cve-2026-90885
防御工具漏洞分析漏洞利用Web应用程序漏洞利用学习与教育
GitHuboscerd/cve-2026-90885

CVE-2026-90885

针对 CVE-2026-90885 的可运行概念验证复现程序,该漏洞是 Apache Camel camel-saxon XQuery 中的 XXE(CWE-611),包含 Spring Boot 和 Quarkus 构建以及修复验证。

查看仓库
44天前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2026-90885 — camel-saxon:对已构建的 Source 执行 XQuery 时使用了 Saxon 的默认配置(XXE)

针对 Apache Camel 漏洞的可运行概念验证复现程序。在该漏洞中,camel-saxon 里的 XQueryBuilder——它为 xquery 语言和 xquery 组件两者求值表达式——在构建其默认 Saxon Configuration 时,所用的解析选项仅包含一条空白字符剥离规则,使 XML 解析器停留在默认状态:接受 DOCTYPE 声明并解析外部实体。

运行时目录技术栈
Camel Spring Bootcamel-spring-boot/Spring Boot 3.5.13 + camel-saxon 4.22.1
Camel Quarkuscamel-quarkus/Camel Quarkus 3.39.0(Quarkus 3.39.0,Camel 4.22.0)

为什么 Spring Boot 使用 4.22.1: 该修复仅在 4.22.1 发布之后才被回移植到 camel-4.22.x,因此 4.22.1 是该分支最后一个受影响的版本,而 4.22.2 是第一个已修复的版本。固定使用 4.22.1 可使该边界成为复现程序的关注点。

演示内容

String、byte[] 和 InputStream 类型的消息体会由 Camel 自带的 XML 类型转换器转换为 javax.xml.transform.Source,这些转换器会针对外部实体对解析器进行配置——因此这些消息体从未受到影响。而已经是 Source 的消息体会被原样交给 Saxon,而基于流的 Source 仍然需要被解析,于是 Saxon 便使用那个默认的 Configuration 对其进行了解析。

cd camel-spring-boot          # or: cd camel-quarkus
mvn clean package
docker compose up -d --build
# the servlet/HTTP port opens before the Camel context finishes starting, so wait for the context:
until [ "$(curl -s http://localhost:8080/exploit/ready)" = "Started" ]; do sleep 1; done
curl -s http://localhost:8080/exploit/attack
docker compose down

在受影响的构建上输出(两个运行时上结果相同):

Expression under attack: concat(string(/r/data), string(/r/data/@leak))
It copies //data and //data/@leak into the result. It reads nothing itself.

1) XQuery over a StreamSource body, external entity -> file:///tmp/cve-2026-90885-secrets/db-password.txt
     expression result: [db.password=LOCAL-FILE-s3cr3t-99]
     local file contents in the result: true

2) XQuery over a StreamSource body, external entity -> http://127.0.0.1:8080/internal/secret
     expression result: [INTERNAL-SECRET-s3cr3t-42]
     internal endpoint response in the result: true

3) XQuery over a StreamSource body, external DTD -> http://127.0.0.1:8080/internal/leak.dtd
     expression result: [no-entity-hereINTERNAL-DTD-WAS-FETCHED]
     attribute defaulted by the fetched DTD in the result: true

4) CONTROL - the same document as a String body (Camel's type converters build the Source)
     expression result: []
     local file contents in the result: false

5) The same String body through a route doing convertBodyTo(Source.class) first
     expression result: [db.password=LOCAL-FILE-s3cr3t-99]
     local file contents in the result: true

Requests the XML parser made to internal endpoints on its own: [GET /internal/secret, GET /internal/leak.dtd]

>>> PROVEN: ...

在实践中,真正重要的是探针 5。 发送方提交的是纯 XML 文本——正如探针 4 所示,这种正文形态不受影响。随后,路由会在表达式运行之前执行 convertBodyTo(Source.class),而仅此一步就会将正文移入受影响的路径。无需攻击者构造的 Source,无需特殊组件,也无需非默认选项:路由中一个普通的转换步骤就是全部前提条件。该公告明确指出了这种情况,同时也指出了路由中较早的组件或处理器将正文设置为基于流的 Source 的情况。

探针 1–3 是通过直接传入 Source 触达同一缺陷,这正是路由中较早的组件会做的事。

路由的样子

没有任何配置错误。没有 configuration 选项,没有解析器设置,表达式也不读取任何内容:

from("direct:xquery")
        .setBody(XQueryBuilder.xquery("concat(string(/r/data), string(/r/data/@leak))").asString());

from("direct:xquery-converted")
        .convertBodyTo(Source.class)
        .setBody(XQueryBuilder.xquery("concat(string(/r/data), string(/r/data/@leak))").asString());

攻击者仅控制被评估的 XML 文档。

漏洞摘要

属性值
组件camel-saxon(XQueryBuilder,由 xquery 语言和 xquery 组件使用)
CWECWE-611(XML 外部实体引用限制不当)
严重性高
攻击向量XML 中带有外部子集的 DOCTYPE,或外部实体,以已构建的基于流的 Source 形式到达 XQuery 表达式
影响读取 Camel 进程可读的文件;使进程向文档指定的主机发起请求
受影响版本从 4.0.0 到 4.18.5 之前,从 4.19.0 到 4.22.2 之前(该代码路径早于 4.0,且存在于 2.x/3.x 中)
修复版本4.18.5、4.22.2、4.23.0
JIRACAMEL-24691
致谢Leon Zlobecki

公告:https://camel.apache.org/security/CVE-2026-90885.html

与 CVE-2026-85250 不是同一问题,后者 涉及 camel-xpath 中的 documentType=InputSource,并已在 4.18.5、4.22.1 和 4.23.0 中修复。两者都是 绕过了默认解析器加固的输入路径,但它们属于不同组件,且任一修复都不覆盖另一个——特别是 4.22.1 解决了 CVE-2026-85250,但未解决此问题。

修复

XQueryBuilder 现在使用解析选项构建其默认 Configuration,这些选项启用 disallow-doctype-decl 并禁用 external-general-entities、external-parameter-entities 和 load-external-dtd,使 Source 主体与 Camel 的 XmlConverter 已应用于 String、byte[] 和 InputStream 主体的加固解析器保持一致。

该变更可见,并记录在 4.23 升级指南中:以已构建的 Source 形式到达 XQuery 且携带 DOCTYPE 的主体现在会被拒绝并报解析错误,而不带 DOCTYPE 的主体不受影响。

只有默认 Configuration 被加固。通过端点或语言的 configuration 选项,或通过 XQueryBuilder.setConfiguration 提供的 Configuration 会按原样使用——因此,确实需要 DOCTYPE 或外部实体处理的部署可以保留它,而因任何其他原因提供自己的 Configuration 的部署必须自行应用相同的解析选项。

已在 main 上通过 apache/camel#26344 (9c23b686)修复,并回移植到 camel-4.22.x(#26728, 0d0ed8bb)和 camel-4.18.x(#26730,ed513f3a)。

检查修复后的构建

将 camel.version 设置为 4.22.2(Spring Boot),或将两个平台版本都设置为携带 Camel 4.22.2 或更高版本的 Camel Quarkus 发行版,然后再次运行。已针对 4.22.1 → 4.22.2 验证:

1) ... [FAILED: XPathException: SXXP0003   Error reported by XML parser: DOCTYPE is disallowed when the
        feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.]
2) ... same                        3) ... same
5) ... same

Requests the XML parser made to internal endpoints on its own: []

>>> NOT reproduced: external access was denied.

升级前须知:在 4.22.2 上,探测 4 以同样的方式失败。在受影响的构建中,该控制项返回了空结果——实体根本没有被解析,也没有报错。加固措施作用于整个默认 Configuration,因此 XQuery 现在会拒绝任何携带 DOCTYPE 的 body,包括那些原本就不受影响的 String body。不含 DOCTYPE 的文档无论如何都不受影响。如果某个部署确实需要向 XQuery 提供带 DOCTYPE 的 XML,请通过 configuration 选项提供你自己的 Configuration——以这种方式提供的配置会按原样使用。

免责声明

本仓库的发布出于教育和防御目的:帮助 Apache Camel 用户理解该漏洞、验证自己是否受影响,并确认升级能够解决该问题。请勿将本材料用于你并不拥有或运营的系统。

下载工具