Repository navigation
fix: bound InclusiveNamespaces PrefixList during exclusive c14n - #156
Merged
Merged
Conversation
adamdecaf
marked this pull request as ready for review
October 26, 2026 19:58
v1.4.1 capped in-scope xmlns maps but still split PrefixList without a limit and walked every token at every element. Scan the attribute in place, cap unique prefixes at 8192, and intersect the set with in-scope namespaces so cost follows the existing namespace bound. Reported-by: Naor Yaacov
adamdecaf
force-pushed
the
fix-exc-c14n-prefixlist-limit
branch
from
October 26, 2026 20:02
1d8e023 to
8a88a3f
Compare
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
v1.4.1 capped in-scope xmlns maps during exclusive canonicalization. It did not bound
InclusiveNamespaces PrefixList.ValidateReferences()still split that attribute without a limit and walked every token at every element, so a long list of undeclared prefixes could stall workers before the digest check.This scans PrefixList in place, keeps unique prefixes only, errors above 8192, and intersects that set with the already-capped namespace map instead of the raw token slice.
Reported privately by Naor Yaacov. Residual of CVE-2026-113729 / GHSA-5588-rp99-5fjh.
Testing
go test -count=1 ./...make checkNewValidator+ValidateReferences(): 10k elements with 250k repeated PrefixList tokens now finish next to an equal-size single-token control, instead of ~500x slower. Unique prefixes above 8192 are refused.🤖 grok