Skip to content

Conversation

cjbarth
Copy link
Contributor

@cjbarth cjbarth commented Apr 21, 2025

This PR is to pull these changes from #498 to the 6.x branch.

@cjbarth cjbarth merged commit ab1c69e into node-saml:6.x Apr 21, 2025
@cjbarth cjbarth deleted the 6.1.0-changes branch April 21, 2025 15:31
// thus the `canonXml` and _only_ the `canonXml` can be trusted.
// Append this to `signedReferences`.
this.signedReferences.push(canonXml);
ref.signedReference = canonXml;
Copy link

@srd90 srd90 Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there exist >1 references and any of the 1+n ( n > 0 ) reference validation fails then it seems based on quick code browsing that at least ref numer 1's signedReference points to canonical representation of ref XML and it is "labelled" as "signed" even though actual signature validation has not occured at all. At this stage only reference digest is validated but attacker might have recalculated digest after altering content at the end of reference "pointer". I.e. this looks similar case that there was with signedReferences array which was not resetted if any of the 1+n references validation failed.

Edit: aforementioned comment was meant to another PR. Any possible further discussion should take place at #498 (comment)

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.

2 participants