Problem
loadReference skips a Transform element that has no Algorithm attribute instead of rejecting it (src/signed-xml.ts#L767-L773):
const transformAttr = utils.findAttr(transform, "Algorithm");
if (transformAttr) {
transforms.push(transformAttr.value);
}
The XMLDSig schema makes the attribute required (§4.4.3.4):
<complexType name="TransformType" mixed="true">
...
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
A DigestMethod without Algorithm already throws could not find Algorithm attribute in node .... A Transform without it names a step that cannot be identified, and verifying as though the element were absent digests something the signer never described.
On 6.3.2, a signature whose SignedInfo contains <Transforms><Transform/><Transform Algorithm="...enveloped-signature"/><Transform Algorithm="...xml-exc-c14n#"/></Transforms>, signed over that SignedInfo, passes checkSignature(). The loaded reference lists only the two transforms that have an Algorithm.
The element is inside SignedInfo, so only the signer can produce it. This is a conformance problem, not a bypass.
Proposal
Throw, as for DigestMethod. That rejects documents that verify today, so it belongs in 7.0.
Problem
loadReferenceskips aTransformelement that has noAlgorithmattribute instead of rejecting it (src/signed-xml.ts#L767-L773):The XMLDSig schema makes the attribute required (§4.4.3.4):
A
DigestMethodwithoutAlgorithmalready throwscould not find Algorithm attribute in node .... ATransformwithout it names a step that cannot be identified, and verifying as though the element were absent digests something the signer never described.On 6.3.2, a signature whose
SignedInfocontains<Transforms><Transform/><Transform Algorithm="...enveloped-signature"/><Transform Algorithm="...xml-exc-c14n#"/></Transforms>, signed over thatSignedInfo, passescheckSignature(). The loaded reference lists only the two transforms that have anAlgorithm.The element is inside
SignedInfo, so only the signer can produce it. This is a conformance problem, not a bypass.Proposal
Throw, as for
DigestMethod. That rejects documents that verify today, so it belongs in 7.0.