Repository navigation
FIX: Detect canonical Windows targets win.ini and web.config in PathTraversalOutputScorer - #3488
Merged
Roman Lutz (romanlutz) merged 2 commits intoOct 25, 2026
Conversation
…raversalOutputScorer
Roman Lutz (romanlutz)
approved these changes
Oct 25, 2026
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.
Description
PathTraversalOutputScorerdetects path traversal payloads aimed at sensitive files. Currently, its default pattern requireswindows/system32for Windows targets, missing:windows/win.ini: The universally recognized, canonical proof-of-concept target on Windows across web security scanners, CTFs, and OWASP testing guides.web.config: The root configuration file on IIS / ASP.NET holding database connection strings, machine keys, and app secrets.This PR adds:
windows{_SEPARATOR}win{_DOT}iniandweb{_DOT}configinto the{_FILE_END}-guarded sensitive file alternation.%2e), and double-encoded dots (%252e).{_FILE_END}boundary checking, ensuring zero false positives on backup or extended files (win.ini.bak,web.config.old).Fixes #3487
Tests and Documentation
tests/unit/score/regex/test_path_traversal_output_scorer.pycoveringwin.iniandweb.configacross forward slashes, backslashes, and encoded dots..,. Then continue.,.\n, and.\r\nendings.../web.config,../windows/win.ini), backup extensions (.bak,.old), and extended filenames are rejected.ruff checkandruff format.