AspNetCore Remote Authenticator for CIE3.0 Allows SAML Response Signature Verification Bypass
Date: 2025-02
Affected: nuget/CIE.AspNetCore.Authentication
Attack vector: deepfake
Category: vulnerability-disclosure
Severity: Critical
CVE: CVE-2025-24895
CWE: CWE-290
CVSS: 9.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N)

### Description Authentication using Spid and CIE is based on the SAML2 standard which provides for two entities: Identity Provider (IdP): the system that authenticates users and provides identity information ( SAML assertions ) to the Service Provider, essentially, it is responsible for managing user credentials and identity; Service Provider (SP): The system that provides a service to the user and relies on the Identity Provider to authenticate the user, receives SAML assertions from the IdP to grant access to resources. The library `cie-aspnetcorerefers` to the second entity, i.e. the SP, and implements the validation logic of the SAML assertions present within the SAML response . The following is a summary diagram of an authentication flow via SAML: ![](https://github.com/user-attachments/assets/5b10c8f8-5121-446f-95f8-c0355daa5959) As shown in the diagram, the IdP, after verifying the user's credentials, generates a signed SAML response, this is propagated to the SP by the user's browser and the SP, after verifying the signature, can extract the data needed to build the user's session. The signature validation logic is central as it ensures that you cannot craft a SAML response with arbitrary assertions and thus impersonate other users. The following is the validation code implemented in `cie-aspnetcore`. ```csharp internal static bool VerifySignature(XmlDocument signedDocument, IdentityProvider? identityProvider = null){ //...SNIP... SignedXml signedXml =


Mitigations:

Architectural layers (MAESTRO):