CVE-2026-104259: ModSecurity removeComments bypass via adjacent comments

CVE-2026-104259 · Severity: medium · CVSS 5.4 · Published 2026-11-09

ModSecurity is a web application firewall that filters malicious traffic for Apache, IIS, and Nginx servers. A flaw in the comment-removal feature allows attackers to bypass security rules by using adjacent comments to hide malicious code, and can cause a buffer over-read when comments appear at the end of input.

Technologies: OWASP Modsecurity. Vendors: OWASP.

Quick answers

Is CVE-2026-104259 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-104259 being exploited in the wild.
How severe is CVE-2026-104259?
Medium severity, with a CVSS score of 5.4, published 9 November 2026.
Which products and versions are affected?
OWASP Modsecurity 2.x before 2.9.15, 3.0.x before 3.0.17.
Is there a fix for CVE-2026-104259?
Yes: fixed in ModSecurity 2.9.15, 3.0.17. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-104259 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-104259?
Check whether you run OWASP Modsecurity at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: ModSecurity 2.9.15, 3.0.17

Technical details

The t:removeComments transformation in ModSecurity 2.9.x and 3.0.x contains a logic error where it copies the character immediately after a comment terminator without re-evaluating whether that character is part of a new comment. This allows adjacent comments to remain in the transformed output, bypassing WAF rules that depend on comment stripping. Additionally, when a comment terminator is the final input, the code reads one byte beyond the buffer boundary.

Affected products

  • OWASP ModSecurity 2.x before 2.9.15, 3.0.x before 3.0.17

Timeline

  • 2026-11-09: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.