Fix/stored xss#3362
Open
RachHavoc wants to merge 5 commits into
Open
Conversation
…ismatch - Add data/cookie_storage to DATA_FILE_GLOBS so --fresh removes it - Catch SystemExit in auth_svc when file_svc._read() fails to decrypt stale cookie_storage; regenerate session key instead of crashing - Add tests: DATA_FILE_GLOBS membership + stale cookie recovery Fixes crash when switching between --insecure and secure mode after PR mitre#3264 introduced persistent session cookies. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
|
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
Adds server-side input validation for the
technique_namefield inAbilityApiManager._validate_ability_data.Previously,
technique_namewas accepted as an unconstrained string whileidandtacticwere both validated against an alphanumeric allowlist. This inconsistency allowed HTML/script
characters to be stored via
POST /api/v2/abilitiesandPUT /api/v2/abilities/{id},contributing to a stored XSS vulnerability in the Debrief plugin's technique graph.
A regex allowlist (
^[a-zA-Z0-9\s\-_()/.,&:]+$) is applied totechnique_nameon write,rejecting values containing
< > " ' ;while accepting all legitimate ATT&CK technique names.Related to: fix/technique-name-xss in mitre/debrief.
Type of change
How Has This Been Tested?
POST /api/v2/abilitieswithtechnique_namecontaining HTML (e.g."><img src=x onerror=alert(1)>) now returns HTTP 400.Command and Scripting InterpreterOS Credential Dumping: /etc/passwd and /etc/shadowExploitation for Privilege EscalationMan-in-the-MiddleChecklist: