Skip to content

fix(944140): prevent whitespace padding bypass in JSP file upload detection#4548

Merged
fzipi merged 3 commits into
mainfrom
fix/944140
Mar 15, 2026
Merged

fix(944140): prevent whitespace padding bypass in JSP file upload detection#4548
fzipi merged 3 commits into
mainfrom
fix/944140

Conversation

@fzipi
Copy link
Copy Markdown
Member

@fzipi fzipi commented Mar 15, 2026

what

  • add t:removeWhitespace transformation to rule 944140 to normalize filenames before regex evaluation
  • add 4 regression tests covering whitespace bypass variants for JSP/JSPX uploads via headers and multipart

why

  • rule 944140 can be bypassed by inserting whitespace in the filename (e.g. shell. jsp or shell.jsp ) because the regex requires the dot to be immediately followed by the extension, and only t:lowercase is applied
  • same class of vulnerability as fixed in 933110

refs

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 15, 2026

📊 Quantitative test results for language: eng, year: 2023, size: 10K, paranoia level: 1:
🚀 Quantitative testing did not detect new false positives

@fzipi fzipi requested a review from a team March 15, 2026 19:50
@fzipi fzipi added this pull request to the merge queue Mar 15, 2026
Merged via the queue into main with commit 3b6c0f7 Mar 15, 2026
8 checks passed
@fzipi fzipi deleted the fix/944140 branch March 15, 2026 20:46
fzipi added a commit that referenced this pull request Mar 26, 2026
…upload detection

Backport upstream fixes from main (#4546, #4547, #4549) that add
t:removeWhitespace transformation to file upload detection rules,
preventing evasion via whitespace padding in filenames.

Rule 944140 (#4548) was not backported as it does not exist in v3.3.
fzipi added a commit that referenced this pull request Mar 27, 2026
* chore: pre-release v3.3.8

Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>

* docs: update changes

Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>

* ci: update versions

Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>

* ci: add pre-commit file

Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>

* fix: pre-commit fixes

Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>

* ci: use go-ftw 0.6.4

Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>

* fix(932180,933110,933111): prevent whitespace padding bypass in file upload detection

Backport upstream fixes from main (#4546, #4547, #4549) that add
t:removeWhitespace transformation to file upload detection rules,
preventing evasion via whitespace padding in filenames.

Rule 944140 (#4548) was not backported as it does not exist in v3.3.

* ci(lint): prevent duplicate workflow runs on PRs

Restrict push trigger to v3.3/dev and v3.3/master branches so that
pull requests only trigger the workflow once via the pull_request event,
instead of running both push and pull_request.

---------

Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
fzipi added a commit that referenced this pull request Mar 28, 2026
Add t:removeWhitespace transformation to rules 932180, 933110, and 933111
to prevent file upload detection bypass via whitespace in filenames.

Backport of #4546, #4547, #4549 from main. Rule 944140 (#4548) skipped
as it does not exist in v3.3.
fzipi added a commit that referenced this pull request Mar 28, 2026
* chore: pre-release v3.3.9 (#4576)

Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>

* fix: backport whitespace padding bypass fixes for 932180, 933110, 933111

Add t:removeWhitespace transformation to rules 932180, 933110, and 933111
to prevent file upload detection bypass via whitespace in filenames.

Backport of #4546, #4547, #4549 from main. Rule 944140 (#4548) skipped
as it does not exist in v3.3.

---------

Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants