Egov.Integrations.MPass.Saml 10.0.4 and 10.0.5 Fix XML Signature Flaw
Updated versions 10.0.4 and 10.0.5 of the MPass SAML handler resolve an XML Signature Wrapping vulnerability that could allow attackers to forge authentication.
Egov.Integrations.MPass.Saml versions 10.0.4 and 10.0.5 fix an XML Signature Wrapping vulnerability in the ASP.NET Core SAML 2.0 handler used by Moldova's MPass service. Earlier versions accept forged responses because attackers can exploit an XML Signature Wrapping flaw to authenticate as any subject.
The package uses .NET's SignedXml class and CheckSignature(publicCertificate, verifySignatureOnly: true) to verify SAML responses. While this confirms that references listed in SignedInfo are validly signed, versions before 10.0.4 fail to bind the signed reference to the response root ID, meaning it does not confirm that a signed reference matches the element the application reads as authoritative.
Attackers holding any single validly signed MPass message can move the signed element elsewhere and place chosen assertion content at the root. Signature verification passes, and relying parties treat the forged content as trusted. Tracked as CWE-347 and CAPEC-475, the flaw was found and publicly disclosed by Serghei Zagaiciuc, with the affected range and fix confirmed by decompiling published packages.
Version 10.0.4 fixes this by requiring exactly one reference whose URI equals the root element ID before accepting the signature. An advisory and decompiled diff are published on masiutin.net. A CVE ID request was submitted via the MITRE CNA of Last Resort form under tracking number CAN-2026-2041077, though no CVE ID is assigned yet.
For other SignedXml users, code should confirm after CheckSignature succeeds that the signed reference covers the exact trusted element, pin the signing certificate from configuration instead of KeyInfo, and keep the default rejection of duplicate IDs enabled.
