gridfs.* 标头注入针对同一 Apache Camel 漏洞的可运行概念验证复现程序,每种运行时一个:
| 运行时 | 目录 | 技术栈 |
|---|---|---|
| Camel Spring Boot | camel-spring-boot/ | Spring Boot 3.2.0 + camel-spring-boot 4.18.2 |
| Camel Quarkus | camel-quarkus/ | Quarkus 3.36.0 + Camel Quarkus 3.36.0(捆绑 Camel 4.20.0) |
两者均为受影响版本(已在 4.14.8 / 4.18.3 / 4.21.0 中修复),且均演示了相同的缺陷:当路由在
mongodb-gridfs 端点上未设置 operation 时,GridFsProducer 会从 gridfs.operation 标头中获取操作。
该标头(以及 gridfs.objectid)不在 Camel* 命名空间中,因此 HTTP 边界过滤器不会将其剥离——文件上传
端点的未认证客户端可将操作切换为 listAll(枚举所有文件,泄露 ObjectId)或 remove(按 id 删除文件)——
CWE-20 / CWE-284。
每个子目录都是一个自包含项目(外加由其 docker-compose.yml 启动的 MongoDB 容器),并带有自己的
Dockerfile 和 README。简而言之,对于任一项目:
cd camel-spring-boot # 或:cd camel-quarkus
mvn clean package
docker compose up -d --build
curl -s http://localhost:8080/exploit/attack
docker compose down
公告:https://camel.apache.org/security/CVE-2026-48204.html
这些复现程序仅供安全研究和授权测试使用,针对的是已公开披露并已修复的漏洞。未经明确许可,请勿将其用于任何系统。
| 属性 | 值 |
|---|
| 组件 | camel-mongodb-gridfs |
| 受影响类 | org.apache.camel.component.mongodb.gridfs.GridFsProducer(当端点 operation 未设置时,从 gridfs.operation 获取操作) |
| CWE | CWE-20(输入验证不当)/ CWE-284(访问控制不当) |
| 影响 | 通过标头覆盖 GridFS 操作 → 枚举 / 读取 / 删除文件;gridfs.metadata NoSQL 注入 |
| 受影响版本 | 4.0.0 至 4.14.8 之前,4.15.0 至 4.18.3 之前,4.19.0 至 4.21.0 之前 |
| 修复版本 | 4.14.8、4.18.3、4.21.0 |
| JIRA | CAMEL-23575(PR apache/camel#23413) |
| 致谢 | Yu Bao(PayPal) |