Skip to content

JS: Fix multiline regexp sanitization - #22966

Draft
owen-mc wants to merge 2 commits into
github:mainfrom
owen-mc:owen-mc/22845-multiline-regexp-sanitizer
Draft

owen-mc wants to merge 2 commits into
github:mainfrom
owen-mc:owen-mc/22845-multiline-regexp-sanitizer

Conversation

@owen-mc

@owen-mc owen-mc commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Stop treating anchored regexps with multiline or unknown flags as whole-string sanitizers. Add regression tests, including documented limitations.

Fixes #22845.

owen-mc and others added 2 commits October 22, 2026 15:28
Account for multiline and unknown flags in the shared whole-string anchoring check so generic and membership-based taint sanitizers agree. Add inline regression coverage for the reported command-injection and reflected-XSS cases, regex API variants, and class-validator decorators.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

JS: Why does SanitizingRegExpTest treat /^...$/m as a whole-string check?

1 participant