Skip to content

RedMesh 0.13.1: keep path segments after ;params in CSRF finding identity - #528

Merged
toderian merged 2 commits into
developfrom
fix/csrf-identity-matrix-params
Oct 6, 2026
Merged

toderian merged 2 commits into
developfrom
fix/csrf-identity-matrix-params

Conversation

@toderian

@toderian toderian commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

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/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. This is a regression from the RM-117 CSRF finding identity shipped in 0.13.0 (#526).

Fix

  • Cut the query and fragment, then drop ;param path parameters per segment, keeping the segments after them. Session ids and cache-busters still do not move the finding id.
  • Two regression tests in test_csrf_finding_identity.py: distinct endpoints behind a ;jsessionid segment stay two findings with distinct ids; a session id in a middle segment does not move the id.
  • Version bump: RedMesh 0.13.0 -> 0.13.1, node ver.py 2.10.480 -> 2.10.481.

Checks

  • New tests fail on develop (1 finding instead of 2) and pass with the fix.
  • red_mesh/tests full suite: 6196 passed, 5 skipped.
  • test_api.py + test_csrf_finding_identity.py after the version bump: 230 passed.
  • Not run: live/Docker scan e2e; coverage is at probe level with requests.get stubbed.

Should merge before #527.

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.
@toderian toderian self-assigned this Oct 6, 2026
@toderian
toderian merged commit f48ae10 into develop Oct 6, 2026
@toderian
toderian deleted the fix/csrf-identity-matrix-params branch October 6, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant