Skip to content

Naxsi 1.8

Latest

Choose a tag to compare

@wargio wargio released this 06 Dec 19:57
· 1 commit to main since this release
88c1f1d

Security Advisories

Advisory Severity Description Affected versions Fixed by
GHSA-4pgx-2hpj-m3hc Medium (5.9) Pre-auth remote stack buffer overflow in text request logger (naxsi_log_as_text_string_ex) 1.7 #241
GHSA-w25f-ff84-vfph Medium (5.9) Out-of-bounds read crash in multipart Content-Disposition parser (nx_content_disposition_parse) <= 1.7 #241
GHSA-qgfg-7cvq-7vh3 Medium (5.4) JSON \uXXXX escapes bypass BODY XSS rules when 1205 is whitelisted <= 1.7 #248
GHSA-8pvp-wgv9-xx3q Medium (5.3) $HEADERS_VAR_X whitelist ignores header name, enabling WAF bypass <= 1.7 #250
GHSA-7mf3-9gcr-72gv Medium (4.0) Multipart parser: fail-open on parse errors allows WAF body bypass <= 1.7 #246

Thanks to @kevinff for reporting GHSA-4pgx-2hpj-m3hc and GHSA-w25f-ff84-vfph.
Thanks to @lichoin for reporting GHSA-7mf3-9gcr-72gv, GHSA-qgfg-7cvq-7vh3 and GHSA-8pvp-wgv9-xx3q

What's New

  • New conditions for rules and whitelists via "if:$variable" (or "if:!$variable"), based on any NGINX variable (map, geo, geoip2, etc..):
    • Rules without a search pattern match only on the condition (for example to block countries via geoip2) and are logged with the new zone VAR.
    • Rules with a search pattern and whitelists are applied only when the condition holds.
    • See the new Conditions chapter and its warning about which NGINX variables can be used.
  • New OWASP CRS rules converted for Naxsi (CRS v4.31.0, paranoia level 1) under naxsi_rules/crs, with the converter tools/crs2naxsi.py and the update script .scripts/crs-update.sh.
  • New whitelist logs (NAXSI_WLLOG), enabled via set $naxsi_whitelist_log 1;, which report the whitelist (config file and line) used for each request; useful to find unused whitelists.
  • New official Docker image (https://github.com/wargio/naxsi/pkgs/container/naxsi), which includes the OWASP CRS rules.
  • Bump of libinjection to v4.0.3; Naxsi can still be built against libinjection < 4.0.0.
  • Fixed linking against the system libinjection.
  • Security fixes: out-of-bounds write in the text logger and out-of-bounds read when parsing the multipart Content-Disposition header.
  • Rewritten multipart parser: quoted boundaries, binary-safe boundary search and handling of malformed multipart bodies.
  • Fixed JSON decoding of the \uXXXX unicode sequences (including surrogate pairs and null bytes).
  • Fixed $HEADERS_VAR_X whitelists not checking the header name.
  • Fixed usage of the pipe symbol (|) within matchzones.
  • Fixed IgnoreIP/IgnoreCIDR:
    • IPv6 /64 networks were not matched.
    • Ignored requests are now always logged with config=ignore.
    • Invalid CIDR masks (like /320 or /24abc) are now refused.
  • Fixed the extended and whitelist logs reporting the wrong zone for FILE_EXT.
  • Improved SQL rules and reduced false positives of rule 50000006.
  • New documentation chapters: integration with Munin and fail2ban, OWASP CRS rules, conditions, and whitelist logs.

What's Changed

  • Add Dockerfile by @wargio in #180
  • Add missing config files. by @wargio in #183
  • Fix usage of pipe symbol in matchzone by @wargio in #190
  • naxsi_src/config: Set the correct variable to link to system libinjection by @BalkanMadman in #195
  • Fix OOB write in text logger and OOB read in content disposition by @wargio in #241
  • Fix multipart parser. by @wargio in #246
  • Fix the JSON decoding of the unicode sequences by @wargio in #248
  • Fix whitelist to NOT ignore headers name by @wargio in #250
  • Add NAXSI_WLLOG support by @wargio in #254
  • Prepare for the release 1.8 (libinjection 4.0.x, OWASP CRS rules, IgnoreIP/IgnoreCIDR fixes) by @wargio in #253
  • Implement naxsi conditions by @wargio in #255

Changes on rules:

  • Update SQL rules to enhance detection of known patterns. by @wargio in #185
  • New Whitelist for Jellyfin by @sevi-kun in #208
  • Fix rule linter sorting of wl (and formatter) by @wargio in #209
  • Fix rule 50000006 - stop matching the plain word "delay" by @haumanto in #245

Changes on Documentation:

Repository maintenance (workflows, readme, etc..):

New Contributors

Full Changelog: 1.7...1.8