CVE-2026-61812: 
ModSecurity vulnerability analysis and mitigation

Overview

CVE-2026-61812 is an HTML entity decoding evasion vulnerability in ModSecurity, an open-source WAF engine for Apache, IIS, and Nginx. The t:htmlEntityDecode transformation function recognized only five named HTML entities (", &, <, >,  ), allowing attackers to encode ASCII separators and operators using unhandled entity names to bypass WAF rules that depend on this transformation. Affected versions are ModSecurity v2 prior to 2.9.15 and v3 from 3.0.0 through 3.0.16. The vulnerability was disclosed on September 30, 2026, and fixed versions were released the same day. It carries a CVSS v4.0 base score of 6.3 (Medium) (GitHub Advisory, Feedly).

Technical details

The root cause is classified as CWE-172 (Improper Encoding or Decoding of Data) and CWE-180 (Incorrect Behavior Order: Validate Before Canonicalize). The t:htmlEntityDecode function used a hand-curated, incomplete entity table covering only five of the 44 named HTML entities that map to ASCII characters, meaning 39 entities (including aliases like &lcub;/&lbrace; for {, &colon; for :, &equals; for =) were passed through undecoded. An additional defect in the v3 decoder used prefix-length matching (strncasecmp with the name length only) instead of exact token-length comparison, causing inputs like &lt;est; to decode to < and silently drop est, enabling further bypass. Attackers can craft HTTP requests with payloads encoded using unhandled entity names (e.g., javascript&colon;execute_my_code()) that browsers decode normally but ModSecurity rules never inspect (GitHub Advisory, v2 Fix Commit, v3 Fix Commit).

Impact

Successful exploitation allows attackers to bypass WAF rules that rely on t:htmlEntityDecode normalization, effectively neutralizing protection for 35 OWASP Core Rule Set (CRS) rules — 28 in REQUEST-941 (XSS), 3 in REQUEST-921 (Protocol Attack), 3 in REQUEST-944 (Java/Log4Shell), and 1 in REQUEST-920 (Protocol Enforcement). There is no general safety net behind these rules; for example, encoding the = character (an attribute separator) defeats @detectXSS (CRS 941100) outright. The integrity impact is low and availability is unaffected, but the bypass enables downstream attacks such as XSS, protocol-level attacks, and potentially Log4Shell exploitation against backend applications that ModSecurity was intended to protect (GitHub Advisory).

Exploitability

No public proof-of-concept exploit code or in-the-wild exploitation has been reported as of the disclosure date. The vulnerability is network-exploitable with no authentication or user interaction required, but attack requirements include the presence of WAF rules using t:htmlEntityDecode. The EPSS score is approximately 0.316%, indicating low near-term exploitation probability. The CVE is not listed in the CISA Known Exploited Vulnerabilities catalog, and NVD's supplemental data confirms exploitation status as "none" (Feedly, GitHub Advisory).

Exploitation steps

  1. Identify target: Determine that the target web application is protected by ModSecurity v2 ≤ 2.9.14 or v3 ≤ 3.0.16 with rules using the t:htmlEntityDecode transformation (e.g., OWASP CRS XSS or protocol attack rules).
  2. Identify blocked payload: Confirm that a direct payload (e.g., q=javascript:execute_my_code()) is blocked by a ModSecurity rule such as SecRule ARGS "@rx javascript:" "id:10002,phase:2,t:none,t:htmlEntityDecode,deny".
  3. Encode with unhandled entities: Replace ASCII characters in the payload with named HTML entities not recognized by the vulnerable decoder. For example, encode : as &colon; to produce q=javascript&colon;execute_my_code(), or encode = as &equals; to bypass attribute-matching rules.
  4. Exploit v3 prefix bug (if applicable): On v3 targets, craft entity tokens with longer-than-expected names (e.g., &lt;est;) to trigger prefix-match decoding, causing the decoder to transform the token incorrectly and pass the payload through.
  5. Submit crafted request: Send the entity-encoded payload to the target application. ModSecurity's t:htmlEntityDecode passes the unrecognized entities through undecoded, so the rule never matches the malicious pattern.
  6. Browser/backend decodes payload: The backend application or browser decodes the HTML entities normally, executing the intended attack (e.g., XSS, JNDI injection) (GitHub Advisory).

Indicators of compromise

  • Network: HTTP requests containing named HTML entity encodings of ASCII operators/separators in parameter values (e.g., &colon;, &equals;, &semi;, &lbrace;, &lcub;, &hat;, &excl;) where the decoded form would match known attack patterns (XSS, JNDI injection strings).
  • Logs: ModSecurity audit logs showing requests with entity-encoded payloads that were not blocked despite matching rule patterns when decoded; absence of expected block/deny log entries for payloads containing javascript&colon; or ${jndi&colon;ldap.
  • Application Logs: Backend application logs showing execution of JavaScript or JNDI lookup strings that should have been blocked by WAF rules, particularly patterns like javascript:, ${jndi:ldap://, or SQL injection operators encoded as HTML entities.

Mitigation and workarounds

Upgrade ModSecurity to version 2.9.15 (v2 branch) or 3.0.17 (v3 branch), which replace the hand-curated entity table with a generated table derived from the WHATWG entities.json specification covering all 44 relevant named entities, and fix the v3 prefix-match bug by requiring exact token-length comparison. No complete workaround exists that fully substitutes for the patch; however, rules using @detectXSS, @detectSQLi, or those that match entity spellings directly in their regex (as CRS 944150–944152 do for Log4Shell) are unaffected by this vulnerability. Administrators should prioritize upgrading if their deployments rely on t:htmlEntityDecode-based rules for XSS or protocol attack detection (v2 Release, v3 Release, GitHub Advisory).

Community reactions

The vulnerability was disclosed by the OWASP ModSecurity maintainers (airween, fzipi, marcstern) via a coordinated GitHub Security Advisory. Community discussion noted that the scope of the missing entities was broader than initially reported — the original report identified only two missing entities (' and :), but the full fix addressed 39 missing entities plus entity aliases used in real-world Log4Shell payloads. The advisory explicitly called out that CRS rules 944150–944152 had already worked around this decoder limitation by matching entity spellings directly in their regex patterns, highlighting the practical awareness of this gap in the security community (GitHub Advisory).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Affected

bookworm

modsecurity-apache

Affected

sid

modsecurity-apache

Affected

trixie

modsecurity-apache

Affected

Ubuntu

Unknown

bionic (esm-apps)

modsecurity-apache

Unknown

devel

modsecurity

Unknown

focal (esm-apps)

modsecurity

Unknown

jammy

modsecurity

Unknown

jammy (esm-apps)

modsecurity

Unknown

noble

modsecurity

Unknown

noble (esm-apps)

modsecurity

Unknown

resolute

modsecurity

Unknown

RHEL / CentOS

Affected

RHEL 8

Not Affected

RHEL 9

Not Affected

RHEL 10

Not Affected

Source: This report was generated using AI

Related ModSecurity vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-73856HIGH8.6
  • ModSecurity logoModSecurity
  • modsecurity
NoYesNov 05, 2026
CVE-2026-73857HIGH7.5
  • ModSecurity logoModSecurity
  • modsecurity
NoYesNov 09, 2026
CVE-2026-61812MEDIUM6.3
  • ModSecurity logoModSecurity
  • cpe:2.3:a:owasp:modsecurity
NoYesNov 09, 2026
CVE-2026-104259MEDIUM5.4
  • ModSecurity logoModSecurity
  • modsecurity
NoYesNov 09, 2026
CVE-2026-61813LOW3.7
  • ModSecurity logoModSecurity
  • modsecurity
NoYesNov 05, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management