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

Source: https://junglewise.ai/threats/cve-2026-104259-modsecurity-is-an-open-source-cross-platform-web-application  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-09. Updated: 2026-11-10  
License: CC BY 4.0 with a link back

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](https://junglewise.ai/threats/technologies/modsecurity). Vendors: [OWASP](https://junglewise.ai/threats/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

- [https://github.com/owasp-modsecurity/ModSecurity/commit/264f348ae1823cb71cead3650b74c165678a1d46](https://github.com/owasp-modsecurity/ModSecurity/commit/264f348ae1823cb71cead3650b74c165678a1d46)
- [https://github.com/owasp-modsecurity/ModSecurity/commit/49a65f471d3130b91f7fff9bfac9fe8dd9b97c44](https://github.com/owasp-modsecurity/ModSecurity/commit/49a65f471d3130b91f7fff9bfac9fe8dd9b97c44)

## Related threats

- [ModSecurity uninitialized pointer dereference in XML parsing](https://junglewise.ai/threats/cve-2026-73857-modsecurity-is-an-open-source-cross-platform-web-application)
- [ModSecurity htmlEntityDecode rule bypass via incomplete entity handling](https://junglewise.ai/threats/cve-2026-61812-modsecurity-is-an-open-source-cross-platform-web-application)
- [ModSecurity response body inspection bypass with mixed-case Content-Type](https://junglewise.ai/threats/cve-2026-73856-modsecurity-is-an-open-source-cross-platform-web-application)
- [ModSecurity multipart parser filename precedence bypass](https://junglewise.ai/threats/cve-2026-104269-modsecurity-is-an-open-source-cross-platform-web-application)
- [ModSecurity @rxGlobal match-limit bypass](https://junglewise.ai/threats/cve-2026-103932-modsecurity-is-an-open-source-cross-platform-web-application)
