XML Signature Wrapping Authentication Bypass in Egov.Integrations.MPass.Saml

Independent technical analysis by Maxim Masiutin. Published October 28, 2026; timeline updated November 1, 2026. CVE ID request pending.

Summary

Egov.Integrations.MPass.Saml is a SAML 2.0 authentication handler for ASP.NET Core published on NuGet by the e-Governance Agency of Moldova. Before version 10.0.4, its response verification checks that an XML signature is valid without checking that the signed reference identifies the response element the application trusts.

An attacker who possesses a validly signed MPass SAML message can use XML Signature Wrapping to separate the signed content from attacker-chosen assertion content presented at the trusted document root. The relying party can then authenticate the attacker as an arbitrary user.

Serghei Zagaiciuc publicly disclosed the package and flaw after decompiling it. After reading that disclosure, Maxim Masiutin independently restored the published NuGet packages, decompiled the relevant assemblies, and confirmed the vulnerable and fixed verification paths and the release boundary.

Vulnerability Details

CVE IDPending assignment by MITRE CNA-LR
Vendore-Governance Agency of the Republic of Moldova
ProductEgov.Integrations.MPass.Saml
EcosystemNuGet
Affected versionsAll published versions before the fix: 8.0.53, 8.0.54, 8.0.55, 8.0.56, and 10.0.2. The first affected version is not established, so every published version earlier than the fixed release is treated as affected.
Fixed versions10.0.4, published October 23, 2026; 10.0.5, published October 24, 2026; 10.0.6, published October 29, 2026
WeaknessCWE-347: Improper Verification of Cryptographic Signature
Attack patternCAPEC-475: Signature Spoofing by Improper Validation
ImpactSAML authentication bypass and arbitrary-user impersonation at a relying party
Proposed severityCritical, CVSS 3.1 score 9.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
FinderSerghei Zagaiciuc
Independent analysisMaxim Masiutin

The CVSS score is the analyst's proposal. The assigning CNA or advisory publisher may score the issue differently.

Technical Analysis

Required Signature Binding

Verifying an XML signature is not sufficient on its own. A SAML consumer must also establish which element the signature covers. The signed Reference URI must resolve uniquely to the element from which the application reads identity and authorization data. Otherwise, signature validity and application trust can apply to different elements.

Vulnerable Verification Path

In versions 8.0.56 and 10.0.2, the decompiled Verify method loads the response root's Signature element and immediately calls SignedXml.CheckSignature:

                        
private static bool Verify(XmlDocument document, X509Certificate2 publicCertificate)
{
    SignedXml signedXml = new SignedXml(document);
    XmlElement xmlElement = document.DocumentElement?["Signature", "http://www.w3.org/2000/09/xmldsig#"];
    if (xmlElement == null)
        return false;
    signedXml.LoadXml(xmlElement);
    return signedXml.CheckSignature(publicCertificate, verifySignatureOnly: true);
}
                        
                    

No statement in this path compares the signature's SignedInfo.References entries with the root response element's ID. A valid signature over a reference therefore does not prove that the response content subsequently trusted by the caller is the signed content.

Fix in Version 10.0.4

Version 10.0.4 adds a binding check before signature verification. The check requires a nonempty root ID, exactly one reference, and a reference URI equal to # followed by that root ID:

                        
signedXml.LoadXml(xmlElement);
string attribute = document.DocumentElement.GetAttribute("ID");
ArrayList references = signedXml.SignedInfo.References;
if (string.IsNullOrEmpty(attribute) || references.Count != 1
    || !(references[0] is Reference reference) || reference.Uri != "#" + attribute)
    return false;
return signedXml.CheckSignature(publicCertificate, verifySignatureOnly: true);
                        
                    

The added check closes the identified wrapping condition by tying the accepted signature reference to the document element the caller treats as authoritative.

Impact and Preconditions

A remote attacker needs a validly signed MPass SAML message. A message obtained through the attacker's own ordinary authentication can satisfy that precondition. The attacker can then attempt to make the relying party consume different assertion content while the library validates the original signature. Successful exploitation bypasses the relying party's authentication decision and can impersonate another subject, including a privileged account where the service maps that subject to elevated privileges.

Certificate handling remains a separate requirement. verifySignatureOnly: true skips certificate-chain validation, so the supplied public certificate must be the pinned MPass signing certificate from trusted configuration, not a certificate selected from attacker-controlled message content. XML parsing and ID resolution must also reject ambiguous duplicate IDs.

Version Analysis and Evidence

NuGet listed seven published versions on October 28, 2026: 8.0.53, 8.0.54, 8.0.55, 8.0.56, 10.0.2, 10.0.4, and 10.0.5. No 10.0.3 release was listed. The vendor published version 10.0.6 on October 29, 2026; its Verify method is identical to that of 10.0.4 and 10.0.5.

  • Maxim Masiutin restored and decompiled versions 8.0.56 and 10.0.2; their Verify methods contain no reference-to-root binding check.
  • Maxim Masiutin restored and decompiled version 10.0.4; its Verify method contains the binding check shown above.
  • Maxim Masiutin decompiled versions 8.0.53 through 8.0.55 individually on October 29, 2026; their Verify methods are identical to that of 8.0.56 and contain no binding check. No fixed release exists on the 8.0 line, which targets .NET 8; the fix exists only on the 10.0 line, which targets .NET 10.

Maxim Masiutin restored the packages from NuGet and decompiled them with ilspycmd 11.2.0. Anyone can reproduce the static comparison using the public package versions linked below. The package's listed source repository returned 404 during the investigation, and the fixed package carried no security note.

Detection

Unlisted package versions can still restore from existing references. Unlisting alone does not create a vulnerability warning; check the version explicitly.

Check direct and transitive NuGet dependencies in each application:

dotnet list package --include-transitive

Also inspect packages.lock.json, project.assets.json, centralized package-version files, deployment manifests, and build artifacts for Egov.Integrations.MPass.Saml. Deployed applications require a separate check because a patched development branch does not prove that production has been rebuilt and redeployed.

Remediation

  1. Upgrade every direct or transitive reference to Egov.Integrations.MPass.Saml 10.0.4 or later. Prefer the current release, 10.0.6. Integrators on .NET 8 have no fixed release in the 8.0 line and need either to move to the 10.0 line or to obtain a backported fix from the vendor.
  2. Rebuild, retest, and redeploy affected relying parties. Confirm the deployed assembly version rather than relying only on source configuration.
  3. Verify that the MPass signing certificate is pinned in trusted configuration and is never accepted from untrusted message KeyInfo.
  4. Keep strict SAML validation enabled, including audience, recipient, issuer, destination, response correlation, and expiration checks.

If an immediate upgrade is impossible, an external validation layer should require exactly one signature reference, require its URI to equal the trusted response root's ID, resolve IDs uniquely, and reject ambiguous documents before identity data is consumed. Such a layer is a temporary compensating control, not a substitute for upgrading.

Scope and Attribution

This advisory covers the signature-verification code and version history of the publicly distributed Egov.Integrations.MPass.Saml library.

Serghei Zagaiciuc is credited as finder because his public LinkedIn post named the package, described the signature-binding flaw, and reported decompiling the library. Maxim Masiutin is credited as analyst for independently confirming the verification paths and version boundary from the published assemblies.

This analysis follows Serghei Zagaiciuc's public disclosure of October 27, 2026 and compares the verification code in the published packages.

Proof of Concept

No weaponized proof of concept, forged SAML response, or attack tool is published here. The vulnerable and fixed code excerpts provide enough information for maintainers and integrators to understand and remediate the defect without supplying a ready-made authentication-bypass instrument.

Disclosure Timeline

Times below use Europe/Chisinau local time. Moldova observed EEST (UTC+03:00) through October 25, 2026 and EET (UTC+02:00) afterward, so the October 23 and 24 rows carry a +03:00 offset and the later rows +02:00. Archive captures and SMTP submission logs establish different events.

Date and timeEvent and evidence
NuGet's catalog records the creation of version 10.0.4 at 17:39 UTC. This version introduces the reference-binding check shown above.
NuGet records publication of version 10.0.5 at 07:18 UTC, which carries the same verification code as 10.0.4.
Serghei Zagaiciuc publicly disclosed the package and the signature-binding flaw on LinkedIn in this post, after decompiling the library. His post was the first public disclosure, four days after the vendor's fix. The time is approximate, from the post's activity record.
Maxim Masiutin published this advisory at 21:27:02 EET (UTC+02:00, Europe/Chisinau; 19:27:02 UTC).
The Internet Archive captured the published advisory at 19:52:49 UTC. Wayback's CDX index records HTTP 200, and the replay response confirms the same timestamp in its Memento-Datetime header. This capture establishes that the advisory was publicly available by that time.
Maxim Masiutin submitted the CVE ID request to the MITRE CNA of Last Resort through cveform.mitre.org, which returned request-tracking number CAN-2026-2041077. MITRE's record gives reservation at 22:02:10 and submission at 22:37:38 local time (20:02:10 and 20:37:38 UTC). The tracking number identifies the request; CVE ID assignment remains pending.
Maxim Masiutin sent the vulnerability notification for request CAN-2026-2041077 to incidents@cert.gov.md, with office@egov.md copied in the prepared message. The sender's mail-client log records connection to mail.masiutin.com:465 and completion of TLS at 02:15:14, then "message to incidents@cert.gov.md and others sent (2576 bytes)" and "1 message(s) sent" at 02:15:16. The agency's mail system records arrival at 02:15:17 and issued its mailbox-delivery report at 02:16:17. The sender's mail server records arrival at 02:15:16 and issued its relay report at 02:15:18, recording acceptance by mx1.gov.md. Neither receipt proves a person read the message. The CAN number is a request-tracking identifier, not an assigned CVE ID.
Maxim Masiutin resent the same notification to the same recipients. The mail-client log records connection to mail.masiutin.com:465 at 10:02:53, then "message to incidents@cert.gov.md and others sent (2576 bytes)" and "1 message(s) sent" at 10:02:55; the byte count matches the first submission. The agency's mail system records arrival at 10:02:56 and issued its mailbox-delivery report at 10:03:01. The sender's mail server records arrival at 10:02:55 and issued its relay report at 10:02:57, recording acceptance by mx1.gov.md.
NuGet's catalog records unlisted entries for versions 8.0.53, 8.0.56, 10.0.2 and 10.0.4 with last-edited times in the 12:32 UTC minute, and for 8.0.54 and 8.0.55 in the 12:35 UTC minute. The packages remain available through the download index.
NuGet records publication of version 10.0.6 at 12:41 UTC. Its Verify method is identical to that of 10.0.4 and 10.0.5.
Maxim Masiutin sent the MPass notification to csirt@asc.gov.md, copying office@egov.md and incidents@cert.gov.md. The sender's server issued relay reports for ASC and CERT at 13:08:39; the agency issued its mailbox-delivery report at 13:11:12. These timestamps record report generation. The retained correspondence contains no ASC case identifier as of November 1, 2026.

A direct GET and HEAD query of this advisory's full URL on October 29, 2026 returned HTTP 200 without a Last-Modified header. The GET response's Date was October 29, 2026, 00:17:42 GMT; that dates the response, not the original publication. The independent archive capture above establishes that the advisory was publicly available by October 28, 2026, at 21:52:49 local time.

Coordinated Disclosure Status

Maxim Masiutin sent the MPass notification to the Agency for Cybersecurity (ASC) on October 30, 2026, copying the e-Governance Agency and CERT-GOV-MD, and requested coordination under Government Decision 824/2025. The retained correspondence contains relay reports for ASC and CERT-GOV-MD and a delivery report from the e-Governance Agency. As of November 1, 2026, the case records contain no ASC case identifier.

References

Revision History

  • October 28, 2026: initial technical analysis and CVE request status.
  • October 29, 2026: added notification and receipt events.
  • October 29, 2026, second revision: added version 10.0.6, the 8.0-series comparison and coordination status.
  • October 29, 2026, third revision: updated scope and attribution.
  • October 29, 2026, fourth revision: clarified the timeline, attribution and affected-version scope.
  • October 30, 2026: added disclosure background and the Romanian decision reference.
  • November 1, 2026: corrected timestamps, added unlisting and ASC notification events, and condensed the revision history; the analyst retains supporting evidence.