github fabriziosalmi/patterns 2026-12-02-crs-v4.31.0
WAF rules 2026-12-02-crs-v4.31.0

26 minutes ago

Patterns build · 2026-12-02

OWASP Core Rule Set coreruleset/coreruleset@v4.31.0 converted into native WAF rules for four web servers. Generated automatically; no manual edits.

Coverage: 761 patterns across 22 categories — SQLi, XSS, RCE, LFI, RFI, plus generic anomaly and protocol-violation rules.

What changed since the previous release

Rules: CRS v4.30.0 to v4.31.0. 13 added, 0 removed, 66 changed, 682 unchanged.

Target Written Output changed Status changed
Nginx 170 to 169 21 3
Apache (ModSecurity) 179 29 2
Traefik 3 to 4 1 3
HAProxy 179 30 2
Envoy 183 30 2

Phrase lists the rules read (6)

  • scanners-user-agents.data is gone
  • windows-powershell-commands.data is gone
  • lfi-os-files.data: 1 added, 0 removed (read by 930120, 930121)
  • php-errors.data: 1 added, 30 removed (read by 953100)
  • restricted-files.data: 1 added, 0 removed (read by 930130)
  • sql-errors.data: 1 added, 0 removed (read by 951100)

Written differently by a target (12)

  • 911100 on Nginx: dropped (operator-unsupported) to dropped (chain-unsupported)
  • 920430 on Nginx: dropped (operator-unsupported) to dropped (chain-unsupported)
  • 932120 on Nginx: approximate to dropped (parameter-too-long)
  • 911100 on Apache (ModSecurity): dropped (operator-unsupported) to dropped (chain-unsupported)
  • 920430 on Apache (ModSecurity): dropped (operator-unsupported) to dropped (chain-unsupported)
  • 911100 on Traefik: dropped (location-unsupported) to dropped (chain-unsupported)
  • 920430 on Traefik: dropped (location-unsupported) to dropped (chain-unsupported)
  • 932239 on Traefik: dropped (location-unsupported) to approximate
  • 911100 on HAProxy: dropped (operator-unsupported) to dropped (chain-unsupported)
  • 920430 on HAProxy: dropped (operator-unsupported) to dropped (chain-unsupported)
  • 911100 on Envoy: dropped (operator-unsupported) to dropped (chain-unsupported)
  • 920430 on Envoy: dropped (operator-unsupported) to dropped (chain-unsupported)

Added (13)

  • 901600 (INITIALIZATION) @rx \S
  • 901610 (INITIALIZATION) @rx \S
  • 901620 (INITIALIZATION) @rx \S
  • 901630 (INITIALIZATION) @rx \S
  • 901640 (INITIALIZATION) @rx \S
  • 901650 (INITIALIZATION) @rx \S
  • 901660 (INITIALIZATION) @rx \S
  • link 1 of 911100 (ENFORCEMENT) !@within %{tx.allowed_methods}
  • link 1 of 920430 (ENFORCEMENT) !@within %{tx.allowed_http_versions}
  • 932400 (RCE) @rx \$[0-9]
  • link 1 of 932400 (RCE) @rx /
  • link 2 of 932400 (RCE) @rx \s
  • 953130 (PHP) @rx phpinfo\(\)</title><meta name=\"ROBOTS\" content=\"NOINDEX,NOFOLLOW,NOARCHIV...

Changed (66)

  • 901360 (INITIALIZATION): operator @rx ^application/x-amz-json-1... to @rx (?i)^application/x-amz-jso..., transformations
  • 901370 (INITIALIZATION): operator @rx ^(application/[a-z0-9.!#$&... to @rx ^(application/[a-z0-9._+-]...
  • 911100 (ENFORCEMENT): operator !@Within %{tx.allowed_methods} to @rx ^.*$, chain
  • 913100 (DETECTION): operator @pmFromFile scanners-user-agen... to @rx (?i)^(?:UserA|user-a)gent$...
  • 920430 (ENFORCEMENT): operator !@Within %{tx.allowed_http_ver... to @rx ^.*$, chain
  • 920460 (ENFORCEMENT): operator @rx (?:^|[^\x5c])\x5c[cdeghijk... to @rx (?i)(?:^|[^\x5c])\x5c[cdeg..., transformations
  • 920470 (ENFORCEMENT): operator !@rx ^[\w/.+-]+(?:\s?;\s(?:a... to !@rx (?i)^[\w/.+-]+(?:\s?;\s..., transformations
  • 920480 (ENFORCEMENT): operator @rx charset\s*=\s*["']?([^;"... to @rx (?i)charset\s*=\s*["']?([..., transformations
  • 920520 (ENFORCEMENT): transformations
  • 920521 (ENFORCEMENT): operator !@rx br|compress|deflate|(?:pa... to !@rx (?i)br|compress|deflate|(..., transformations
  • 920530 (ENFORCEMENT): operator @rx charset.?charset to @rx (?i)charset.?charset, transformations
  • 920600 (ENFORCEMENT): operator !@rx ^(?:(?:*|[^!"(),/:-?... to !@rx (?i)^(?:(?:*|[^!"(),/..., transformations
  • link 2 of 920650 (ENFORCEMENT): operator @rx ^[a-z]{3,10}$ to @rx (?i)^[a-z]{3,10}$, transformations
  • 921110 (ATTACK): operator @rx (?:get|p(?:(?:os|u)t|atch|... to @rx (?i)(?:get|p(?:(?:os|u)t|a..., transformations
  • 921120 (ATTACK): operator @rx [\n\r][^0-9A-Z_a-z]?(?:co... to @rx (?i)[\n\r][^0-9A-Z_a-z]?(..., transformations
  • 921130 (ATTACK): operator @rx (?:\bhttp/\d|<(?:html|meta... to @rx (?i:\bhttp/\d|<(?:html|met..., transformations
  • 921160 (ATTACK): operator @rx [\n\r]+(?:[\s\x0b]|locatio... to @rx (?i)[\n\r]+(?:[\s\x0b]|loc..., transformations
  • 921240 (ATTACK): operator @rx unix:[^|]| to @rx (?i)unix:[^|]|, transformations
  • 921421 (ATTACK): operator @rx ^[^\s\x0b,;]+[\s\x0b,;].*?... to @rx (?i)^[^\s\x0b,;]+[\s\x0b,;..., transformations
  • 921422 (ATTACK): operator @rx ^[^\s\x0b,;]+[\s\x0b,;].*?... to @rx (?i)^[^\s\x0b,;]+[\s\x0b,;..., transformations
  • 922110 (ATTACK): operator !@rx ^(?:(?:*|[^!"(),/:-?... to !@rx (?i)^(?:(?:*|[^!"(),/..., transformations
  • 922120 (ATTACK): operator @rx content-transfer-encoding:... to @rx (?i)content-transfer-encod..., transformations
  • 922130 (ATTACK): transformations
  • 922150 (ATTACK): operator @rx ^content-type\s*:\s*(.)$ to @rx (?i)^content-type\s:\s*(...., transformations
  • 932120 (RCE): operator @pmFromFile windows-powershell... to @rx (?i)(?:^|[^-0-9a-z])(?:po...
  • and 41 more, in changes.json

The whole of it, per rule and per target, is in changes.json, attached to this release.

Backends

Backend Format Bots Archive Size
Nginx map + if 2157 nginx_waf.zip 56K
Apache ModSecurity 2157 apache_waf.zip 88K
Traefik Middleware TOML 2157 traefik_waf.zip 24K
HAProxy Pattern files 2157 haproxy_waf.zip 80K
Envoy RBAC filter 2157 envoy_waf.zip 88K

Quick install

curl -LO https://github.com/fabriziosalmi/patterns/releases/download/2026-12-02-crs-v4.31.0/nginx_waf.zip
unzip nginx_waf.zip -d /etc/nginx/waf_patterns

Integration guides → Nginx · Apache · Traefik · HAProxy · Envoy

What each target does with each rule

Of the 761 records in the CRS v4.31.0 intermediate representation, what each target does:

Target Full Approximate Unsound Dropped
Nginx 11 158 0 592
Apache (ModSecurity) 8 171 0 582
Traefik 1 3 0 757
HAProxy 7 172 0 582
Envoy 7 176 0 578

Why a record is dropped, by the first reason the backend found:

Reason Nginx Apache (ModSecurity) Traefik HAProxy Envoy
an operator the backend cannot express 292 292 292 292
matched on a request component the target does not have 81 81 567 81 81
part of a chain, and the target cannot require all of it 134 134 134 134 134
not a rule: it changes another rule 55 55 55 55 55
it refuses ordinary traffic once converted 11 17 9 5
its severity is below what refuses, and the target cannot only record 1 8 8
longer than the target accepts 16
it records and does not refuse 3 3 3 3

What a written rule loses, in how many of them:

Loss Nginx Apache (ModSecurity) Traefik HAProxy Envoy
matched on other variables than the rule names 152 166 3 172 176
transformations the rule was written to run after are not applied 121 121 2 120 124

The verdict for every rule and target is in coverage.json, attached to this release. How to read it.

Verify

This release is 2026-12-02-crs-v4.31.0, and it stays: releases are never deleted or replaced, so a link to this tag is a link to these files. Every file in it is signed by the workflow that built it, and attested. SHA256SUMS lists their hashes and is signed with the rest.

cosign verify-blob --bundle nginx_waf.zip.sigstore.json \
  --certificate-identity https://github.com/fabriziosalmi/patterns/.github/workflows/update_patterns.yml@refs/heads/main \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com nginx_waf.zip

Every step, and how to pin to a release.

SHA-256

dd1cf92d1ef3ebc5ff18c4ec365d992856f711afb6c85ce345fe1b5cbe1e8948  nginx_waf.zip
46569ecc6b9e9a3a26164bc6a4ef9bd14ce58b8a0865887c7234759d21ffb394  apache_waf.zip
30b236537745c82264824cd2c5a8af9b5655d5147e4480e26685f361a48be75d  traefik_waf.zip
00349ea3abafb0afc32987a5baf16e72aa830089533ae14fa6c7f52920772160  haproxy_waf.zip
7a43eef2473a106ccba14fb9790da5e147f69cd7c273b7384350bf77c0bed887  envoy_waf.zip
echo "dd1cf92d1ef3ebc5ff18c4ec365d992856f711afb6c85ce345fe1b5cbe1e8948  nginx_waf.zip" | sha256sum -c -

Documentation · Source · Issues

Don't miss a new patterns release

NewReleases is sending notifications on new releases.