---
id: "CVE-2026-104774"
kind: "vulnerability"
aliases: ["CVE-2026-104774", "GHSA-pc5q-qfxp-ggqv", "GO-2026-6696"]
title: "Coraza: jsDecode Off-by-One in Octal Escape Handling Enables WAF Bypass in github.com/corazawaf/coraza"
severity: "medium"
cvss: 5.8
epss: 0.004
exploited: false
status: "open"
category: "package"
products: [{"name": "github.com/corazawaf/coraza", "fixed": [], "affected": "all versions", "ecosystem": "go"}, {"name": "github.com/corazawaf/coraza/v2", "fixed": [], "affected": "all versions", "ecosystem": "go"}, {"name": "github.com/corazawaf/coraza/v3", "fixed": ["3.8.0"], "affected": ">= 3.0.0, < 3.8.0", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["coraza", "go", "modsecurity", "package", "waf"]
not_affected_if: ["no-jsdecode-rules", "version-3.8.0-or-later"]
published_at: "2026-10-12T20:17:07+00:00"
first_seen_at: "2026-10-23T19:13:08+00:00"
updated_at: "2026-10-23T19:58:06+00:00"
sources: [{"source": "govuln", "url": "https://pkg.go.dev/vuln/GO-2026-6696", "first_seen_at": "2026-10-23T19:13:08+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-104774", "first_seen_at": "2026-10-23T19:13:43+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-104774", "first_seen_at": "2026-10-23T19:35:23+00:00"}]
---

# Coraza: jsDecode Off-by-One in Octal Escape Handling Enables WAF Bypass in github.com/corazawaf/coraza

Coraza, a Go web application firewall library, mishandles JavaScript octal escapes in its t:jsDecode transform, decoding them into null bytes. An unauthenticated attacker can hide XSS or SQL injection payloads in octal escapes so the WAF rules miss them while the backend still decodes the attack.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- go:github.com/corazawaf/coraza affected all versions fixed ?
- go:github.com/corazawaf/coraza/v2 affected all versions fixed ?
- go:github.com/corazawaf/coraza/v3 affected >= 3.0.0, < 3.8.0 fixed 3.8.0

## How to check

Run go list -m github.com/corazawaf/coraza/v3 in the project and check whether the version is >= 3.0.0 and < 3.8.0.
Check whether any WAF rule uses t:jsDecode.

## Fix

Upgrade github.com/corazawaf/coraza/v3 to 3.8.0 or later.

## Timeline

- 2026-10-23T19:13:08+00:00 govuln https://pkg.go.dev/vuln/GO-2026-6696
- 2026-10-23T19:13:43+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-104774
- 2026-10-23T19:35:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-104774

## From the sources

OWASP Coraza WAF is a golang modsecurity compatible web application firewall library. From 3.0.0 until 3.8.0, the t:jsDecode transformation in internal/transformations/js_decode.go:64-70 includes the backslash in the octal buffer, causing ParseInt to fail and return a null byte. The flaw is triggered when a rule relies on t:jsDecode and the request contains JavaScript octal escape sequences. An unauthenticated attacker can encode attack syntax with JavaScript octal escapes so the backend decodes the intended bytes while Coraza rules using t:jsDecode inspect corrupted null-byte output. The mismatch can bypass WAF rules and expose the protected application to attacks such as cross-site scripting or SQL injection. This issue is fixed in version 3.8.0.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
