fix(security): patch CVE-2026-11998 — SCE resource URL policy bypass (12/12) - #14
Merged
Merged
Conversation
adjustMatcher() wrapped user-supplied RegExp sources as ^source$, so a top-level alternation like /https:\/\/a\.com|https:\/\/b\.com/ bound the anchors to the outer alternatives only — https://a.com.evil.net matched and was treated as a trusted resource URL (XSS, CVSS 7.6). Wrap the source in a non-capturing group instead: ^(?:source)$. - src/ng/sce.js: anchor fix + CVE marker comment - test/ng/sceSpecs.js: regression tests for alternation bypass - .github/workflows/ci.yml: verify marker survives into built output - README.md: 12/12 CVE table + badge - dist rebuilt (angular.js, angular.min.js, map) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Patches CVE-2026-11998 (High, CVSS 7.6), published 2026-06-24 — raised on PR #7 by @mattyb. Upstream AngularJS is EOL and will not fix it.
The bug
adjustMatcher()insrc/ng/sce.jsanchored user-supplied RegExp matchers as^source$. With a top-level alternation the anchors bind to the outer alternatives only:The fix
Wrap the source in a non-capturing group —
^(?:source)$— so the anchors always apply to the whole expression. One line; string matchers ('self', wildcard patterns) are unaffected since escaping makes alternation impossible there.Changes
src/ng/sce.js— anchor fix + CVE marker commenttest/ng/sceSpecs.js— regression tests (alternation bypass blocked, legit URLs still match, plain/pre-anchored regexes unchanged).github/workflows/ci.yml— verify the marker survives into built output (same pattern as the other 11)README.md— badge + table now 12/12 (3 HIGH, 9 MEDIUM)angular.js,angular.min.js,.map— rebuilt distNotes for reviewer
SECURITY.mdis still the stock upstream file even though the README links to it for "full details" — worth a follow-up.🤖 Generated with Claude Code