Repository navigation
RedMesh 0.13.1: keep path segments after ;params in CSRF finding identity - #528
Merged
Merged
Conversation
What changed: - _csrf_identity_action cuts the query and fragment, then drops `;param` path parameters per segment instead of truncating at the first `;`. - Two regression tests: distinct endpoints behind a `;jsessionid` segment stay two findings; a session id in a middle segment does not move the id. Why: - `/account;jsessionid=ABC/delete` and `/account;jsessionid=ABC/update` both normalised to `/account`, so the CSRF probe's (page, action) dedup dropped the second finding and its evidence. Regression from the RM-117 CSRF finding identity, found while reviewing release PR #527. - No version bump; ships with the next release. Checks: - test_csrf_finding_identity.py: new tests red before the fix, 11 passed after. - red_mesh/tests full suite: 6196 passed, 5 skipped. - git diff --check: clean.
What changed: - REDMESH_BACKEND_VERSION and PENTESTER_API_01 __VER__ 0.13.0 -> 0.13.1. - ver.py 2.10.480 -> 2.10.481. - test_api.py release assertions follow the new version. Why: - Patch release for the CSRF finding identity fix, so reports can tell a 0.13.0 run (collapses `;param` endpoints) from a fixed one. Checks: - test_api.py + test_csrf_finding_identity.py: 230 passed.
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.
Problem
Found while reviewing release PR #527.
_csrf_identity_action(red_mesh/worker/web/hardening.py) cut the form action at the first;./account;jsessionid=ABC/deleteand/account;jsessionid=ABC/updateboth normalised to/account, so the CSRF probe's(page, action)dedup dropped the second finding and its evidence. This is a regression from the RM-117 CSRF finding identity shipped in 0.13.0 (#526).Fix
;parampath parameters per segment, keeping the segments after them. Session ids and cache-busters still do not move the finding id.test_csrf_finding_identity.py: distinct endpoints behind a;jsessionidsegment stay two findings with distinct ids; a session id in a middle segment does not move the id.ver.py2.10.480 -> 2.10.481.Checks
develop(1 finding instead of 2) and pass with the fix.red_mesh/testsfull suite: 6196 passed, 5 skipped.test_api.py+test_csrf_finding_identity.pyafter the version bump: 230 passed.requests.getstubbed.Should merge before #527.