Security Advisories (4)
CVE-2025-40934 (2025-11-26)

XML-Sig versions 0.27 through 0.67 for Perl incorrectly validates XML files if signatures are omitted. An attacker can remove the signature from the XML document to make it pass the verification check. XML-Sig is a Perl module to validate signatures on XML files.  An unsigned XML file should return an error message.  The affected versions return true when attempting to validate an XML file that contains no signatures.

CVE-2026-18568 (2026-08-03)

XML::Sig versions from 0.29 before 0.72 for Perl allow signature verification bypass because verify returns true when every signature was skipped before any cryptographic check. verify in lib/XML/Sig.pm counts the `//dsig:Signature` elements into `$numsigs` and iterates over them, but two paths reach `next` before any digest or key check runs: a `SignedInfo/Reference/@URI` that resolves to no element while `$numsigs` is greater than 1, and, when `id_attr` is set, a reference that does not match the requested ID. The loop records nothing about what it checked, so when every signature takes one of those paths control reaches the unconditional `return 1` that ends verify. Two `Signature` elements whose Reference URI names an ID that no element carries is enough, as is one such element combined with `id_attr`. Any caller that passes untrusted XML to verify can receive a true return for a document in which no digest and no signature value was checked; a `cert` or `cert_text` trust anchor does not change this, because no key check runs. Versions up to 0.28 use an XML::XPath based verify that has no such skip and are not affected.

CVE-2026-9390 (2026-08-03)

XML::Sig versions before 0.71 for Perl allow XPath injection in ID lookup. verify() and _get_signed_xml() in lib/XML/Sig.pm build XPath expressions by concatenating the SignedInfo/Reference/@URI value read from the document being verified. The value is neither escaped nor checked against the NCName grammar that XML requires of an ID, so a URI containing a single quote closes the string literal in the generated expression and appends arbitrary XPath operators. A crafted URI can make the lookup match elements the reference does not name, or every element in the document, so which node is selected for digest verification is decided by the injected expression rather than by the reference.

CVE-2026-9487 (2026-08-03)

XML::Sig versions before 0.71 for Perl allow signature wrapping via duplicate ID. _get_signed_xml() in lib/XML/Sig.pm, called from verify(), resolves the SignedInfo Reference/@URI to a node with the XPath expression "//*[@ID='$id']" and returns the first node of the resulting node set. A document in which two elements share that ID value is accepted: the digest and signature are checked against whichever element comes first in document order, and the duplicate is not detected. Such a document verifies successfully while an application that resolves the same ID independently can read the second, attacker supplied element; in a SAML2 context this places the contents of an Assertion under attacker control.

Changes for version 0.31-TRIAL (TRIAL RELEASE)

  • This release fixes a number of issues. The biggest changes are related to signing and verifying with DSA key. Previously DSA signing and verifying worked previously only with XML::Sig signed xml and verfication only worked with XML::Sig. Now it is able to sign and verify xml interchangably with xmlsec1 and others.
  • In addition, in signing xml XML::Sig now looks at the SignedInfo for the CanonicalMethod to ensure that it matches.
    • c317d09 Merge pull request #14 from perl-net-saml2/sign-dsa 4393a05 Update some of the documentation d833f54 Remove unused _set_key_info function e2fe47a Remove unused _find_prefixlist function 168beb5 Remove unused function 2bf5a02 Update saml request tests for DSA and xmlsec1 signed files 988888c Update linux.yml b718a9f Merge pull request #13 from perl-net-saml2/sign-dsa 6c0168a Fixes #10 - Can now sign and validate DSA signed XML that can be verified by xmlsec1 and other xmlsec verifiers 4843b7c Merge pull request #12 from perl-net-saml2/issue11 e14aec3 Fixes #11 - use CanonicalMethod from SignedInfo to sign 3df1cff Remove spaces on EOL
  • Known Issues: #6 - Cannot sign xml with multiple ID references

Changes for version 0.30-TRIAL (TRIAL RELEASE)

  • Fixes an issue with the calculation of the digest. It should be based on the Transforms not the CanonicalMethod

Changes for version 0.29-TRIAL (TRIAL RELEASE)

  • Rewrite the sign and verify to fix issues validating some valid documents Change to XML::LibXML Add support for more modern Canonicalization Methods

Modules