REQBODY_ERROR "Extra content at the end of the document" after 3.0.15 update
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先比较 ModSecurity v3.0.14 和 v3.0.15 之间的请求体 XML 解析,使用报告中描述的 REQBODY_ERROR 路径和 nginx connector 上下文。调查间歇性出现的“Extra content at the end of the document”日志,并建立一个可复现的请求;完成后应识别出 regression 或 trigger,并包含经过验证的修复或 regression test。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
I updated from version 3.0.14 to 3.0.15 today. Unfortunately, I don't have a ton of helpful info, but I've noticed a few errors that I haven't seen before with REQBODY_ERROR tripping.
Logs and dumps
Here's an example nginx error log (with IP and domain changed).
body.xml:1: parser error : Extra content at the end of the document
2026/05/12 20:51:59 [error] 22751#22751: *430298 [client 123.123.123.123] ModSecurity: Access denied with code 400 (phase 2). Matched "Operator `Eq' with parameter `0' against variable `REQBODY_ERROR' (Value: `1' ) [file "/etc/nginx/modsec/modsecurity.conf"] [line "53"] [id "200002"] [rev ""] [msg "Failed to parse request body."] [data "XML parsing error: XML: Failed to parse document."] [severity "2"] [ver ""] [maturity "0"] [accuracy "0"] [hostname "example.com"] [uri "/"] [unique_id "177863351988.105338"] [ref "v269,1"], client: 123.123.123.123, server: example.com, request: "GET / HTTP/1.1", host: "example.com"
To Reproduce
Sorry, I don't know how to reproduce this. I've seen this a handful of times in millions of requests.
Server (please complete the following information):
- ModSecurity version (and connector): ModSecurity v3.0.15 with nginx-connector v1.0.4
- WebServer: nginx 1.26
- OS (and distro): Amazon Linux 2
Rule Set (please complete the following information):
- Running any public or commercial rule set? CRS
- What is the version number? 4.26.0
- 主要语言
- C++
- 星标
- 9.8k
- 派生
- 1.8k
- 平均合并
- 2 小时 46 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
owasp-modsecurity/ModSecurity 的其他 Issue
-
2.x Platform - IIS
难度 1/5 1 小时以内 新手友好度 90/100
owasp-modsecurity/ModSecurity#3623 · 1 条评论 ·
维护者通常 1 天内回复
-
2.x Platform - IIS
难度 2/5 1-3 小时 新手友好度 82/100
owasp-modsecurity/ModSecurity#3621 · 1 条评论 ·
维护者通常 1 天内回复
-
2.x Platform - IIS
难度 2/5 1-3 小时 新手友好度 84/100
owasp-modsecurity/ModSecurity#3619 · 1 条评论 ·
维护者通常 1 天内回复
-
2.x Platform - IIS
难度 2/5 1-3 小时 新手友好度 76/100
owasp-modsecurity/ModSecurity#3612 · 1 条评论 ·
维护者通常 1 天内回复
-
3.x
难度 2/5 1-3 小时 新手友好度 70/100
owasp-modsecurity/ModSecurity#3580 · 1 条评论 ·
维护者通常 1 天内回复
查看 owasp-modsecurity/ModSecurity 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
grumpycoders/pcsx-redux#2171 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
bytedance/trae-agent#524 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 84/100
AcademySoftwareFoundation/openexr#2683 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
microsoft/onnxruntime#32881 ·
维护者通常 1 天内回复