fix: allow optional json. prefix in rule 932171 ARGS_NAMES pattern#4703
Merged
Conversation
libModSecurity3/Coraza prefix ARGS_NAMES with "json." for JSON body parameters, so the start-anchored Shellshock pattern in 932171 never matched JSON body key names on those engines. Sibling RCE rules in the same file (932250, 932260, etc.) already account for this via an optional (?:json\.)? prefix.
Contributor
|
📊 Quantitative test results for language: |
3 tasks
EsadCetiner
previously approved these changes
Jul 11, 2026
…71.yaml Co-authored-by: Esad Cetiner <[email protected]>
EsadCetiner
approved these changes
Jul 13, 2026
This was referenced Jul 19, 2026
fzipi
added a commit
that referenced
this pull request
Jul 20, 2026
…4728) Partial cherry-pick of #4703. That PR's actual json.-prefix fix for ARGS_NAMES is already present on this branch: backporting PR #4672 earlier took the LTS side wholesale for this file and silently dropped the fix for hand-written inline rules (932171, 942361, see d9eda15), which was then independently restored on this branch as part of preparing v4.25.1 - before #4703 re-fixed the same gap on main (where it had regressed separately via an unrelated fork-merge conflict resolution mistake). So the only real delta here is formalizing 932171 into a proper regex-assembly file (previously hand-written inline) and applying the project's standard [\s\x0b] whitespace-class normalization - a consistency/maintainability change, not a functional fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what
Rule 932171 (Shellshock, CVE-2014-6271) targets
ARGS_NAMES|ARGS|FILES_NAMESwith the start-anchored pattern^\(\s*\)\s+\{. The regex now allows an optionaljson.prefix:^(?:json\.)?\(\s*\)\s+\{.why
libModSecurity3/Coraza prefix
ARGS_NAMESwithjson.for parameters extracted from a JSON request body, soARGS_NAMESfor a JSON key like() { :; }becomesjson.() { :; }. The^anchor in 932171 never matched that prefixed name, meaning the rule missed Shellshock payloads submitted as JSON body keys on those engines. Sibling RCE rules in the same file (932250, 932260, 932236, etc.) already handle this exact case via an optional(?:json\.)?prefix; 932171 was the one rule in the family that hadn't been updated.crs-linterflags this class of issue.refs
ai disclosure
json.ARGS_NAMES prefix; authoringregex-assembly/932171.ra; regenerating the rule regex viacrs-toolchain; writing the new go-ftw regression test case; drafting this PR descriptioncrs-linteragainst the full rule set and confirmed the 932171 finding is gone with zero new errors; ran the fullREQUEST-932-APPLICATION-ATTACK-RCEgo-ftw suite (935 tests) against bothmodsec2-apacheandmodsec3-nginx, confirming all pass; manually reverted the fix and re-ran the new test againstmodsec3-nginxto confirm it fails without the change (proving the bug is real and the test catches it), then restored the fix and re-confirmed all tests pass