Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-104774 Overview
CVE-2026-104774 affects the OWASP Coraza Web Application Firewall (WAF), a Go-based library compatible with ModSecurity rulesets. Versions 3.0.0 through 3.7.x contain a flaw in the t:jsDecode transformation implemented in internal/transformations/js_decode.go. The function incorrectly includes the backslash character in the octal buffer, causing strconv.ParseInt to fail and emit a null byte instead of the intended decoded value. Attackers can encode malicious payloads using JavaScript octal escape sequences so backend applications decode the real bytes while Coraza rules inspect corrupted null-byte output. The mismatch allows WAF rule evasion for attack classes such as cross-site scripting (XSS) and SQL injection [CWE-172: Encoding Error].
Critical Impact
Unauthenticated remote attackers can bypass WAF rules relying on t:jsDecode, exposing protected applications to injection attacks that Coraza is intended to block.
Affected Products
- OWASP Coraza WAF versions 3.0.0 through 3.7.x
- Applications using Coraza as a reverse-proxy or embedded WAF library
- Deployments relying on ModSecurity Core Rule Set (CRS) rules that invoke t:jsDecode
Discovery Timeline
- 2026-10-12 - CVE-2026-104774 published to NVD
- 2026-10-13 - Last updated in NVD database
Technical Details for CVE-2026-104774
Vulnerability Analysis
The defect lives in the JavaScript escape sequence decoder at internal/transformations/js_decode.go:64-70. When Coraza encounters an octal escape such as \101, the loop copies the backslash into the parsing buffer along with the digits. Passing a non-octal character to strconv.ParseInt with base 8 returns an error, and the handler silently writes a 0x00 byte into the output. Rules that normalize input through t:jsDecode therefore see a corrupted string containing null bytes, while the downstream application performs correct JavaScript octal decoding and receives the attacker's intended payload. This encoding desynchronization between the WAF and the backend defeats signature matching for injection attacks.
Root Cause
The root cause is an indexing error in buffer construction. The loop started copying at input[i+j] (which equals the backslash on the first iteration) instead of input[i+1+j] (the first octal digit). A secondary issue in escape_seq_decode.go parsed octal sequences using an 8-bit width, causing values above \377 to saturate at 0xFF rather than being truncated to the low byte as ModSecurity does.
Attack Vector
An unauthenticated attacker sends an HTTP request containing a payload encoded with JavaScript octal escape sequences. For example, the character A can be represented as \101. Coraza's t:jsDecode corrupts the output into null bytes, so a rule looking for script or SELECT fails to match. The backend application, written in JavaScript or any language that interprets octal escapes, reconstructs the original attack string and processes it.
// Patched decoder in internal/transformations/js_decode.go
j := 0
for (i+1+j < inputLen) && (j < 3) {
// i points at the backslash, so the octal digits start at i+1
buf[j] = input[i+1+j]
j++
// Look at the next character to decide whether to keep consuming
// octal digits.
if i+1+j >= inputLen || !isodigit(input[i+1+j]) {
break
}
}
Source: GitHub Commit f9b7afd
The companion fix in escape_seq_decode.go widens the parse size to prevent saturation on sequences above \377:
// Up to 3 octal digits are consumed (\0 - \777), so the value may
// not fit in a byte: it has to be parsed with a wider bit size and
// then truncated to its low byte, mirroring the `strtol(...) & 0xFF`
// of Modsec implementation.
bc, _ := strconv.ParseUint(input[i+1:i+j], 8, 16)
data[d] = byte(bc)
Source: GitHub Commit f9b7afd
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2026-104774
Indicators of Compromise
- HTTP request bodies or query parameters containing JavaScript octal escape sequences such as \101\102\103 or \074script\076
- WAF audit logs showing t:jsDecode normalization output filled with 0x00 bytes for requests that reached the application successfully
- Spikes in request traffic targeting endpoints protected by rules referencing t:jsDecode
Detection Strategies
- Inspect Coraza audit logs for transformed payloads containing high counts of null bytes correlating to successful backend responses
- Deploy out-of-band signatures that match raw octal escape patterns (\\[0-7]{1,3}) in request bodies independent of t:jsDecode
- Correlate backend application logs (XSS reflections, SQL errors) against Coraza allow decisions for the same request identifier
Monitoring Recommendations
- Enable full request/response logging on Coraza for a baseline period after upgrading to verify rule efficacy
- Alert on anomalous increases in requests containing backslash-digit sequences to parameters that normally receive printable ASCII
- Track the installed Coraza version across reverse proxies and sidecars to confirm every instance runs 3.8.0 or later
How to Mitigate CVE-2026-104774
Immediate Actions Required
- Upgrade all deployments of OWASP Coraza to version 3.8.0, which contains the fixes in commit f9b7afd
- Audit CRS and custom rules for use of t:jsDecode and verify they are backed by complementary transformations such as t:urlDecode or t:none
- Review recent WAF-allowed traffic for octal escape patterns to assess whether the flaw was exercised prior to patching
Patch Information
The fix is included in the Coraza v3.8.0 release. The patch commit f9b7afdbcedce7ad814663eaee2e342578ea3bb2 corrects both the index arithmetic in js_decode.go and the parse width in escape_seq_decode.go. See the GHSA-pc5q-qfxp-ggqv advisory for coordinator details.
Workarounds
- Chain additional transformations in rule definitions (for example, t:lowercase,t:removeNulls) so null bytes injected by the flaw do not prevent pattern matches
- Add custom rules that reject requests containing raw JavaScript octal escape sequences in untrusted parameters until upgrades are complete
- Place a second normalization layer (such as a reverse proxy that URL- and JS-decodes inputs) in front of Coraza for defense in depth
# Update Coraza dependency to the patched release
go get github.com/corazawaf/coraza/v3@v3.8.0
go mod tidy
# Verify the version in use
go list -m github.com/corazawaf/coraza/v3
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

