Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-104259— ModSecurity: removeComments Transformation Fails to Strip Adjacent Comments, Enabling WAF Rule Bypass

Quick assessment

Affected
owasp-modsecurity ModSecurity
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

ModSecurity 是一款开源、跨平台的 Web 应用防火墙(WAF)引擎,适用于 Apache、IIS 和 Nginx。在 2.9.15 和 3.0.17 版本之前, 中的 函数以及 中的 函数在实现 时,会直接复制注释终止符后的下一个字符,而不会对其进行重新评估。因此,相邻的注释可能导致后续注释残留在转换后的值中,从而允许攻击者利用内联注释混淆技术绕过依赖注释剥离的安全规则。此外,当注释终止符位于输入内容的末尾时,该复制操作会读取输入缓冲区之后的一个字节。此问题已在 2.9.15 和 3.0.17 版本中修

CVSS 5.4 · Medium

Possible ATT&CK Techniques 1 AI

T1190 · Exploit Public-Facing Application
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-104259

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
ModSecurity: removeComments Transformation Fails to Strip Adjacent Comments, Enabling WAF Rule Bypass
Source: CVE Program / CVE List V5
Vulnerability Description
ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx. Prior to 2.9.15 and 3.0.17, msre_fn_removeComments_execute in apache2/re_tfns.c and inplace() in src/actions/transformations/remove_comments.cc implement t:removeComments by copying the character immediately after a comment terminator without re-evaluating it. Adjacent comments can therefore leave a later comment in the transformed value, allowing inline-comment obfuscation to bypass rules that depend on comment stripping. When a comment terminator is the final content, the same copy reads one byte beyond the input buffer. This issue is fixed in versions 2.9.15 and 3.0.17.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
控制流实现总是不正确
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
owasp-modsecurity ModSecurity < 2.9.15 -

II. Public POCs for CVE-2026-104259

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-104259

请登录查看更多情报信息。

Other References for CVE-2026-104259 (5)

Same Patch Batch · owasp-modsecurity · 2026-11-09 · 3 CVEs total

CVE-2026-73857 7.5 HIGH ModSecurity v3 XML Request Body Processor Uninitialized Pointer Dereference Vulnerability
CVE-2026-61812 6.3 MEDIUM ModSecurity: HTML decoder missing entities, leading to evasion

IV. Related Vulnerabilities