VYPR
High severity8.5GHSA Advisory· Published May 29, 2026· Updated May 29, 2026

authentik's XML Signature Wrapping in SAML Source ACS allows authentication as arbitrary federated user

CVE-2026-47201

Description

Summary

authentik's SAML Source ACS endpoint is vulnerable to XML Signature Wrapping when validating upstream SAML responses. An attacker with any account at the upstream IdP can reuse a valid signed assertion to authenticate as another federated user.

Patches

authentik 2026.5.1, 2026.2.4 and 2025.12.6 fix this issue.

Impact

Affected: authentik deployments using a SAML Source for upstream SAML federation with signed assertions, or signed responses without signed assertions. Not affected: deployments that do not use SAML Source for upstream SAML federation.

The SAML Source trusts that the verified XML signature belongs to the assertion or response that authentik later consumes. A crafted SAML response can make signature verification succeed against the attacker's original signed assertion while authentik reads identity data from a different forged assertion.

An attacker first completes a legitimate login to the upstream IdP and captures the signed SAML response sent through their browser. They then submit a modified response to the ACS endpoint where the valid signature still verifies, but the consumed assertion contains a victim identifier or attacker-chosen attributes.

The attacker can authenticate as a victim who has previously used the SAML Source, or as a local user matched by forged email or username when those matching modes are enabled.

Workarounds

Disable affected SAML Sources, or block access to their ACS endpoints.

For more information

If there are any questions or comments about this advisory:

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

An XML Signature Wrapping flaw in authentik's SAML Source ACS endpoint lets an attacker reuse a valid assertion to impersonate any federated user.

Vulnerability

The SAML Source ACS endpoint in authentik is vulnerable to XML Signature Wrapping when validating upstream SAML responses [1][2][3]. Affected deployments are those using a SAML Source for upstream SAML federation with signed assertions, or signed responses without signed assertions [2][3]. The vulnerability occurs because the SAML Source trusts that the verified XML signature belongs to the assertion or response that authentik later consumes [2][3]. A crafted SAML response can make signature verification succeed against the attacker's original signed assertion while authentik reads identity data from a different forged assertion [2][3]. Versions prior to 2026.5.1, 2026.2.4, and 2025.12.6 are affected [1][2][3].

Exploitation

An attacker with any account at the upstream IdP first completes a legitimate login and captures the signed SAML response sent through their browser [2][3]. They then submit a modified response to the ACS endpoint where the valid signature still verifies, but the consumed assertion contains a victim identifier or attacker-chosen attributes [2][3]. The attacker does not need to know the victim's credentials, only the ability to replay and modify SAML responses [2][3].

Impact

On successful exploitation, the attacker can authenticate as a victim who has previously used the SAML Source, or as a local user matched by forged email or username when those matching modes are enabled [2][3]. This results in unauthorized access to the authentik deployment and any downstream services trusting its authentication [2][3].

Mitigation

The issue is fixed in authentik versions 2026.5.1, 2026.2.4, and 2025.12.6 [1][2][3]. As a workaround until patching, administrators can disable affected SAML Sources or block access to their ACS endpoints [2][3]. No other workarounds are documented in the available references.

AI Insight generated on May 29, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

3
  • authentik/authentikGHSA2 versions
    < 0.0.0-20260528144335-a370d76d23c7+ 1 more
    • (no CPE)range: < 0.0.0-20260528144335-a370d76d23c7
    • (no CPE)range: <2025.12.6 || >=2026.2.0 <2026.2.4 || >=2026.5.0 <2026.5.1
  • ghsa-coords
    Range: < 0.0.0-20260528144335-a370d76d23c7

Patches

2
a370d76d23c7

security: automated internal backport of patch GHSA-c3m2-jqmq-pvp3.sec.patch to authentik-main (#22732)

https://github.com/goauthentik/authentikauthentik-automation[bot]May 28, 2026via ghsa
10 files changed · +392 14
  • authentik/sources/saml/processors/response.py+22 12 modified
    @@ -143,9 +143,21 @@ def _verify_conditions(self):
                 if datetime.fromisoformat(on_or_after).replace(tzinfo=UTC) < _now:
                     raise SAMLException("Assertion is not valid yet or expired.")
     
    -    def _verify_signature(self, signature_node: _Element):
    -        """Verify a single signature node"""
    -        xmlsec.tree.add_ids(self._root, ["ID"])
    +    def _verify_signature(self, signature_node: _Element, target: _Element):
    +        """Verify a single signature node against the given target element."""
    +        target_id = target.attrib.get("ID")
    +        if not target_id:
    +            raise InvalidSignature("Signed element is missing an ID attribute.")
    +        refs = signature_node.xpath("./ds:SignedInfo/ds:Reference", namespaces=NS_MAP)
    +        if len(refs) != 1:
    +            raise InvalidSignature("Signature must contain exactly one Reference.")
    +        ref_uri = refs[0].get("URI", "")
    +        if ref_uri not in ("", f"#{target_id}"):
    +            raise InvalidSignature(
    +                "Signature Reference URI does not match the signed element's ID."
    +            )
    +
    +        xmlsec.tree.add_ids(target, ["ID"])
     
             ctx = xmlsec.SignatureContext()
             key = xmlsec.Key.from_memory(
    @@ -168,24 +180,22 @@ def _verify_response_signature(self):
             signature_nodes = self._root.xpath("/samlp:Response/ds:Signature", namespaces=NS_MAP)
     
             if len(signature_nodes) != 1:
    -            raise InvalidSignature("No Signature exists in the Response element.")
    +            raise InvalidSignature("Expected exactly one Signature in the Response element.")
     
    -        self._verify_signature(signature_nodes[0])
    +        self._verify_signature(signature_nodes[0], self._root)
     
         def _verify_assertion_signature(self):
             """Verify SAML Assertion's Signature (after decryption)"""
             signature_nodes = self._root.xpath(
                 "/samlp:Response/saml:Assertion/ds:Signature", namespaces=NS_MAP
             )
    -
             if len(signature_nodes) != 1:
    -            raise InvalidSignature("No Signature exists in the Assertion element.")
    +            raise InvalidSignature("Expected exactly one signed Assertion in the Response.")
    +        signature_node = signature_nodes[0]
    +        assertion = signature_node.getparent()
     
    -        self._verify_signature(signature_nodes[0])
    -        parent = signature_nodes[0].getparent()
    -        if parent is None or parent.tag != f"{{{NS_SAML_ASSERTION}}}Assertion":
    -            raise InvalidSignature("No Signature exists in the Assertion element.")
    -        self._assertion = parent
    +        self._verify_signature(signature_node, assertion)
    +        self._assertion = assertion
     
         def _verify_request_id(self):
             if self._source.allow_idp_initiated:
    
  • authentik/sources/saml/tests/fixtures/response_signed_assertion_uri_empty.xml+41 0 added
    @@ -0,0 +1,41 @@
    +<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_resp_assert_uri_empty" Version="2.0" IssueInstant="2014-07-17T01:01:48Z" Destination="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"><saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer><samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:Status><saml:Assertion ID="_assert" Version="2.0" IssueInstant="2014-07-17T01:01:48Z"><saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer><Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    +<SignedInfo>
    +<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    +<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
    +<Reference URI="">
    +<Transforms>
    +<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
    +<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    +</Transforms>
    +<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
    +<DigestValue>6AZlgEwsPEWwPPioj5HiNRStaPAm70zIRSBGnYaRc+E=</DigestValue>
    +</Reference>
    +</SignedInfo>
    +<SignatureValue>fei+JUaTHlQuy6/icjyZKUh5kx9qvL5xEqUfwOa1kiLtlfCbMCcEFHMEjePb1uPW
    +fAePa/v9mIl8pV7TrALI1xicdwRPvvM6xgiWe5hQDU+MKd88bHuU/O/0DUktku+e
    +ANR4kYQUAgkmmMCSPSruD3zIgVTAI8AMEpTtDNuHr8C12phsDkqaRQ1OP/ptC//2
    +s6eeJ0DizMWkv/UHrqN8PSoTSgIl30Ffq30t/9TY644lBjgcQZD4h0uvpaRo/M0/
    +yxcgfP6U3ec9ucePFJKprNXvkmNSh/DGbA0BPx1zoB7xf1nhyIYZI76GqC1NP0rh
    +YQ1BinW++XE19PvY66MnIA==</SignatureValue>
    +<KeyInfo>
    +<X509Data>
    +<X509Certificate>MIIC0jCCAbqgAwIBAgIUXHr2/LJAqtsJ4CcXkFjMwJo8HmQwDQYJKoZIhvcNAQEL
    +BQAwIzEhMB8GA1UEAwwYVVJJLWVtcHR5IGFzc2VydGlvbiB0ZXN0MB4XDTE0MDEw
    +MTAwMDAwMFoXDTMwMDEwMTAwMDAwMFowIzEhMB8GA1UEAwwYVVJJLWVtcHR5IGFz
    +c2VydGlvbiB0ZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArzIB
    +E4WYhfFNJk2VcvxTX9+cdyJ+v+GCAU4BxSJ1/97BPf3UN4yob23qohnnnMlGAO2x
    +QBK2VBQKjNZo3qwy2t5xhsa0YLjjWGxAEL1s5K8cQlkYwkciTy+RFpMXmM80kk8p
    +ZdZFgrjf5ltincH4QuhJcN3/fsEibHQibymWeb/0I3Mba6Uh+gssMN82NYETl677
    +I+5HV4wgJWMh1vaZFbid+YFBeWWJoIAIdbTQEAwIJriTA43lgbcK0Lo9A8/RCH1O
    +RVsQSkpA3kfs9yJ9AvKglBIThapR1iRgtVsC9LdiauHmiNU+8POSHXWByXaWOK0o
    +Izfg/lI+xKSWJerhUwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQA+/3kRE6jYFfgy
    +vHZdOX2cFOA5Y0N/RZmdt34tsfCiqP2vHtfQUje8gQAhjmV6dFk4wptPF1FsP601
    +bMp+9LsRsb4y6pxy5m7xKVK9P/EI33N2zZZL9tlJ7CPIA81DPi53lYOvX54UIi2I
    +GpF6QyYMX2HTs/KVxo4gYnOnkyqPw6QrKaWpJLQndQd1rTn4/ybWW/9XU46RYf7/
    +7Z8H8t4n4lhPYm5WGer4eG+k+F3R04yhwSm3Wi91gkQwQdGPgFSPe1z8TusDw/Q/
    +1ax1a/mNoN9NCcZgg3L0xZgbtDnzBr/Gd/MWBQdDgRM7DpcWaVVcXq5GRLLeAvwM
    +uF73araE
    +</X509Certificate>
    +</X509Data>
    +</KeyInfo>
    +</Signature><saml:Subject><saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">test_user</saml:NameID><saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"><saml:SubjectConfirmationData NotOnOrAfter="2024-01-18T06:21:48Z" Recipient="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"/></saml:SubjectConfirmation></saml:Subject><saml:Conditions NotBefore="2014-07-17T01:01:18Z" NotOnOrAfter="2024-01-18T06:21:48Z"><saml:AudienceRestriction><saml:Audience>http://sp.example.com/demo1/metadata.php</saml:Audience></saml:AudienceRestriction></saml:Conditions><saml:AuthnStatement AuthnInstant="2014-07-17T01:01:48Z" SessionIndex="_session"><saml:AuthnContext><saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml:AuthnContextClassRef></saml:AuthnContext></saml:AuthnStatement></saml:Assertion></samlp:Response>
    \ No newline at end of file
    
  • authentik/sources/saml/tests/fixtures/response_signed_assertion_xsw3.xml+72 0 added
    @@ -0,0 +1,72 @@
    +<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_8e8dc5f69a98cc4c1ff3427e5ce34606fd672f91e6" Version="2.0" IssueInstant="2014-07-17T01:01:48Z" Destination="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685">
    +  <saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer>
    +  <samlp:Status>
    +    <samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
    +  </samlp:Status>
    +  <saml:Assertion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" ID="_evil" Version="2.0" IssueInstant="2014-07-17T01:01:48Z">
    +    <saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    +  <ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    +    <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
    +  <ds:Reference URI="#pfxa06693ef-cec7-f4a6-cb7f-ad074445a1a3"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>zNDuGxwP4gVkv/Dzt7kiKo/4gzk=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>GLP/vE8uxerB0uDpPslUgLPBL6ePQB619MoQ0I2Y5lAtFE6CB1zh8BnzChRx/bFjNy4byfOe8mFfM0r7WUi1PJOFWyUPoatdLl7wHHBIRTnPpYmu3Tb2Gz0sOP0F8wW7JkBft5gJfVw49nk5si9/3Q3o52jnJZ7dPtqfIOh8uNeopikK0HLF6sU05qCCtjcXfniEnLQFNBFMo9uY5GQqmR5n3nqPz1wYyyfFOAbVmGgBIoO2PfGX2GVLQhltc9qf2JMhks4jgZsZ8iLUIiH1lcLGWZEEs94k8k0P6gSv1uZ7Vbhksd/N9Jq9pCVuEJ/jRPcAdVjzbxqKQAj6ELwr8O6fepTzA+CAdwEolBnx/C6TmSbVZ+IWk6QUGe4x4+IAukC+0hkKENlO0ELOScksvyhpgHbxNA4rp+DhGupCaO/I2RrsQkmvavbqm+wSEspK7scK112SDunjDvqPHsPYgukD33T/97PxTLorg2kKP9HHJwPJKoXXeyOGcA6vwK+RqrAlZ2dLGAgcXo+sJcdCLuvxDNz9VXofBjBZIKVKdmYhm0QJaPYHtuQsAyFavQhdOBOmGHb7QX3YE3Xy4dX4LymtT+Jlb1I4FJSht/9HUIHW1FdhfDak4f7gUgjuMamMddLD0jVgeESupSREzFv/gj2IrctkbgjAO0iuuiBgKMg=</ds:SignatureValue>
    +<ds:KeyInfo><ds:X509Data><ds:X509Certificate>MIIFUzCCAzugAwIBAgIRAL6tbNcE9Ej9gNlbGKswfFMwDQYJKoZIhvcNAQELBQAwHTEbMBkGA1UEAwwSYXV0aGVudGlrIDIwMjUuNi4zMB4XD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GHR5+u1WFIb5siK25xh/OnS7bLdLic6AkjZSrx91+0v2Jn9gfUqbs5AJ040XzAAdx/Mb4s0+537yhB+/JXPylR1QxhGbO7koXQ5JDhAXWKCw2O1C+80mN8dbhQvDkEtsXrHrtXclcqf2TT89XAzc5HAC8NmP4SF+FafAREQB1KdaG4QAbc/gnjsX2YJD89SDL+3jMp6F7R1Ym+bWt5oWqx2tkm6HGXd3fbpfQlnfrRN60tMjjLmw1cDMhOhpdragY5zokniEUL2pKVtrxFp7V1ZpoMI0Kt5MKkOXrezi542NWSgkGehlsDLD9wtuCNem2arR0mNnMLdYkMG7G0dpAq3Tl32dgfMfyKnNyE2O/6/EeEuzUH2NfTU1p7AUQfLrf4rtNcJEs9OAPuC9vy7w9YEpF997T+FhR2Ub1C423NQj4bwlS/9f7MIBkSi1EgnQuiSGB5epxAKI3oOVrmzOpTuvr6wZXV9pM3zdfbcoGuFWP6Ix7W8G5vg+0WvoSjc2fwGXYlidEK3xlQSMAaQ4CMClpPsKLScRq1nrQGzPYoiL1DYubsOWx9ohll6+jNjKI6f79WwbHYrW4EeRIOz38+m46EDjAWZBMgrE7J/3DhgeLEVJYBA5K0=</ds:X509Certificate></ds:X509Data></ds:KeyInfo></ds:Signature>
    +    <saml:Subject>
    +      <saml:NameID SPNameQualifier="http://sp.example.com/demo1/metadata.php" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">ATTACKER_FORGED_NAMEID</saml:NameID>
    +      <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
    +        <saml:SubjectConfirmationData NotOnOrAfter="2024-01-18T06:21:48Z" Recipient="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"/>
    +      </saml:SubjectConfirmation>
    +    </saml:Subject>
    +    <saml:Conditions NotBefore="2014-07-17T01:01:18Z" NotOnOrAfter="2024-01-18T06:21:48Z">
    +      <saml:AudienceRestriction>
    +        <saml:Audience>http://sp.example.com/demo1/metadata.php</saml:Audience>
    +      </saml:AudienceRestriction>
    +    </saml:Conditions>
    +    <saml:AuthnStatement AuthnInstant="2014-07-17T01:01:48Z" SessionNotOnOrAfter="2024-07-17T09:01:48Z" SessionIndex="_be9967abd904ddcae3c0eb4189adbe3f71e327cf93">
    +      <saml:AuthnContext>
    +        <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml:AuthnContextClassRef>
    +      </saml:AuthnContext>
    +    </saml:AuthnStatement>
    +    <saml:AttributeStatement>
    +      <saml:Attribute Name="uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">ATTACKER_FORGED</saml:AttributeValue>
    +      </saml:Attribute>
    +      <saml:Attribute Name="mail" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">ATTACKER_FORGED</saml:AttributeValue>
    +      </saml:Attribute>
    +      <saml:Attribute Name="eduPersonAffiliation" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">ATTACKER_FORGED</saml:AttributeValue>
    +        <saml:AttributeValue xsi:type="xs:string">ATTACKER_FORGED</saml:AttributeValue>
    +      </saml:Attribute>
    +    </saml:AttributeStatement>
    +  </saml:Assertion>
    +<saml:Assertion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" ID="pfxa06693ef-cec7-f4a6-cb7f-ad074445a1a3" Version="2.0" IssueInstant="2014-07-17T01:01:48Z">
    +    <saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer>
    +    <saml:Subject>
    +      <saml:NameID SPNameQualifier="http://sp.example.com/demo1/metadata.php" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7</saml:NameID>
    +      <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
    +        <saml:SubjectConfirmationData NotOnOrAfter="2024-01-18T06:21:48Z" Recipient="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"/>
    +      </saml:SubjectConfirmation>
    +    </saml:Subject>
    +    <saml:Conditions NotBefore="2014-07-17T01:01:18Z" NotOnOrAfter="2024-01-18T06:21:48Z">
    +      <saml:AudienceRestriction>
    +        <saml:Audience>http://sp.example.com/demo1/metadata.php</saml:Audience>
    +      </saml:AudienceRestriction>
    +    </saml:Conditions>
    +    <saml:AuthnStatement AuthnInstant="2014-07-17T01:01:48Z" SessionNotOnOrAfter="2024-07-17T09:01:48Z" SessionIndex="_be9967abd904ddcae3c0eb4189adbe3f71e327cf93">
    +      <saml:AuthnContext>
    +        <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml:AuthnContextClassRef>
    +      </saml:AuthnContext>
    +    </saml:AuthnStatement>
    +    <saml:AttributeStatement>
    +      <saml:Attribute Name="uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">test</saml:AttributeValue>
    +      </saml:Attribute>
    +      <saml:Attribute Name="mail" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">test@example.com</saml:AttributeValue>
    +      </saml:Attribute>
    +      <saml:Attribute Name="eduPersonAffiliation" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">users</saml:AttributeValue>
    +        <saml:AttributeValue xsi:type="xs:string">examplerole1</saml:AttributeValue>
    +      </saml:Attribute>
    +    </saml:AttributeStatement>
    +  </saml:Assertion>
    +</samlp:Response>
    
  • authentik/sources/saml/tests/fixtures/response_signed_assertion_xsw_nested.xml+35 0 added
    @@ -0,0 +1,35 @@
    +<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_resp" Version="2.0" IssueInstant="2014-07-17T01:01:48Z" Destination="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"><saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer><samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:Status><saml:Assertion ID="pfxa06693ef-cec7-f4a6-cb7f-ad074445a1a3" Version="2.0" IssueInstant="2014-07-17T01:01:48Z"><saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    +  <ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    +    <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
    +  <ds:Reference URI="#pfxa06693ef-cec7-f4a6-cb7f-ad074445a1a3"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>zNDuGxwP4gVkv/Dzt7kiKo/4gzk=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>GLP/vE8uxerB0uDpPslUgLPBL6ePQB619MoQ0I2Y5lAtFE6CB1zh8BnzChRx/bFjNy4byfOe8mFfM0r7WUi1PJOFWyUPoatdLl7wHHBIRTnPpYmu3Tb2Gz0sOP0F8wW7JkBft5gJfVw49nk5si9/3Q3o52jnJZ7dPtqfIOh8uNeopikK0HLF6sU05qCCtjcXfniEnLQFNBFMo9uY5GQqmR5n3nqPz1wYyyfFOAbVmGgBIoO2PfGX2GVLQhltc9qf2JMhks4jgZsZ8iLUIiH1lcLGWZEEs94k8k0P6gSv1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CMClpPsKLScRq1nrQGzPYoiL1DYubsOWx9ohll6+jNjKI6f79WwbHYrW4EeRIOz38+m46EDjAWZBMgrE7J/3DhgeLEVJYBA5K0=</ds:X509Certificate></ds:X509Data></ds:KeyInfo></ds:Signature><saml:Subject><saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">FORGED_VICTIM</saml:NameID></saml:Subject><saml:Conditions NotBefore="2014-07-17T01:01:18Z" NotOnOrAfter="2024-01-18T06:21:48Z"><saml:AudienceRestriction><saml:Audience>http://sp.example.com/demo1/metadata.php</saml:Audience></saml:AudienceRestriction></saml:Conditions><saml:Advice><saml:Assertion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" ID="pfxa06693ef-cec7-f4a6-cb7f-ad074445a1a3" Version="2.0" IssueInstant="2014-07-17T01:01:48Z">
    +    <saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer>
    +    <saml:Subject>
    +      <saml:NameID SPNameQualifier="http://sp.example.com/demo1/metadata.php" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7</saml:NameID>
    +      <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
    +        <saml:SubjectConfirmationData NotOnOrAfter="2024-01-18T06:21:48Z" Recipient="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"/>
    +      </saml:SubjectConfirmation>
    +    </saml:Subject>
    +    <saml:Conditions NotBefore="2014-07-17T01:01:18Z" NotOnOrAfter="2024-01-18T06:21:48Z">
    +      <saml:AudienceRestriction>
    +        <saml:Audience>http://sp.example.com/demo1/metadata.php</saml:Audience>
    +      </saml:AudienceRestriction>
    +    </saml:Conditions>
    +    <saml:AuthnStatement AuthnInstant="2014-07-17T01:01:48Z" SessionNotOnOrAfter="2024-07-17T09:01:48Z" SessionIndex="_be9967abd904ddcae3c0eb4189adbe3f71e327cf93">
    +      <saml:AuthnContext>
    +        <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml:AuthnContextClassRef>
    +      </saml:AuthnContext>
    +    </saml:AuthnStatement>
    +    <saml:AttributeStatement>
    +      <saml:Attribute Name="uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">test</saml:AttributeValue>
    +      </saml:Attribute>
    +      <saml:Attribute Name="mail" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">test@example.com</saml:AttributeValue>
    +      </saml:Attribute>
    +      <saml:Attribute Name="eduPersonAffiliation" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">users</saml:AttributeValue>
    +        <saml:AttributeValue xsi:type="xs:string">examplerole1</saml:AttributeValue>
    +      </saml:Attribute>
    +    </saml:AttributeStatement>
    +  </saml:Assertion></saml:Advice></saml:Assertion></samlp:Response>
    \ No newline at end of file
    
  • authentik/sources/saml/tests/fixtures/response_signed_response_uri_empty.xml+40 0 added
    @@ -0,0 +1,40 @@
    +<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_resp_uri_empty" Version="2.0" IssueInstant="2014-07-17T01:01:48Z" Destination="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"><saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer><Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    +<SignedInfo>
    +<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    +<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
    +<Reference URI="">
    +<Transforms>
    +<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
    +<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    +</Transforms>
    +<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
    +<DigestValue>h6La1VQZ6VO/Bi/a3g2Uhkp27kV1ijJvIB6xlgLGu7M=</DigestValue>
    +</Reference>
    +</SignedInfo>
    +<SignatureValue>ItqDe3xfN9sN44z9pudYI+GdVEz7MnLXvG3+afjS8ws52c8fUryoK0lgH3l0i3mY
    +cFKiQwiuRx86AB6uGH13ToOoXq3peK911PeGZ/fCt15x14x6v69r9vG+Mw4KAc+y
    +7J/a3BOltEoU9SfNHBAIkEgbHP35bF5iYSVlIfLho8BRCVT4rMv/K/n65Hd88Fas
    +Es2oxS95hYUf1of9pHDOuvEYM+VpMZw3OuMci7X8ZszCxdJbgP6D4m7w9wWBbAAi
    +xWWuLnU2sFkLNeBh5KuumLNLG1Dreqiz0d4/tu+P9F4NcP2FAdG79/Y+Ga9d0Wf7
    +yf05WcieZgV4hhHNwQcauw==</SignatureValue>
    +<KeyInfo>
    +<X509Data>
    +<X509Certificate>MIICvjCCAaagAwIBAgIUGjmjYk5z7ya8VH2Faah5vvVmEHIwDQYJKoZIhvcNAQEL
    +BQAwGTEXMBUGA1UEAwwOVVJJLWVtcHR5IHRlc3QwHhcNMTQwMTAxMDAwMDAwWhcN
    +MzAwMTAxMDAwMDAwWjAZMRcwFQYDVQQDDA5VUkktZW1wdHkgdGVzdDCCASIwDQYJ
    +KoZIhvcNAQEBBQADggEPADCCAQoCggEBAKEuJi9Gny9OfQScZEG1R9Gy5pqbM7it
    +pGda6gm4PXuFQisMapdg0DwO3odY1grTQE6gFEjSCYtEoGyuJMSUNdILvc7sfCWa
    +QkuXCnkx7nXgyiHLNuhgkhw6kDXgRMzdaI/B7IlZkZYnfyXWi6A6lQ6dLJRU1p0o
    +C+JawKngvmOAAKvhaC1keEbfUh//8UhK/YkjJShV1c0ijFlucj4eYDQyf9x9lYw7
    +oukjnVFKmhqiRO/SxwhYjYbyTppVRzC4sCJz0KRn4qwnGV5x2+jDqUvFUxJc5W7f
    +N+utrfNWeszmP5Elw+ezIsq+3D9ss+nHmtXIDxVNA3dp8tZQKzQ4WzcCAwEAATAN
    +BgkqhkiG9w0BAQsFAAOCAQEART2PW/rXPU5d+NTJnP2mdIi5Ft01gpaRgY1iBsFm
    ++D6zXT/k9wr56GEDLWUf2qOJeXsNc+f9FKI0BCVb/5vVoB60AAMHKbb+NxwoXLHi
    +dT6DaEPK1VGdEBnpL5uOII3pO42FMPewBUNuoUmb9zipyPoL6zbc7khRcBBIYMlr
    +05Y2tqJqECNAtGQ9+v5CBcECP3QI4L0UmCJMwpj7XH5TrfKfLPZuUEvQaET63dXb
    +ioi+P6KEpuxblOL0Uj2e2erhJYavqCnoxt+0eUDDBsrwuk7/sRtbBO0XjkgEtJZ8
    +n3OS74cjqIwTx+PqObGThECnyBYwONY7RWU5G4r6kqMXBg==
    +</X509Certificate>
    +</X509Data>
    +</KeyInfo>
    +</Signature><samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:Status><saml:Assertion ID="_assert" Version="2.0" IssueInstant="2014-07-17T01:01:48Z"><saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer><saml:Subject><saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">test_user</saml:NameID><saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"><saml:SubjectConfirmationData NotOnOrAfter="2024-01-18T06:21:48Z" Recipient="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"/></saml:SubjectConfirmation></saml:Subject><saml:Conditions NotBefore="2014-07-17T01:01:18Z" NotOnOrAfter="2024-01-18T06:21:48Z"><saml:AudienceRestriction><saml:Audience>http://sp.example.com/demo1/metadata.php</saml:Audience></saml:AudienceRestriction></saml:Conditions><saml:AuthnStatement AuthnInstant="2014-07-17T01:01:48Z" SessionIndex="_session"><saml:AuthnContext><saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml:AuthnContextClassRef></saml:AuthnContext></saml:AuthnStatement></saml:Assertion></samlp:Response>
    \ No newline at end of file
    
  • authentik/sources/saml/tests/fixtures/signature_cert_assertion_uri_empty.pem+18 0 added
    @@ -0,0 +1,18 @@
    +-----BEGIN CERTIFICATE-----
    +MIIC0jCCAbqgAwIBAgIUXHr2/LJAqtsJ4CcXkFjMwJo8HmQwDQYJKoZIhvcNAQEL
    +BQAwIzEhMB8GA1UEAwwYVVJJLWVtcHR5IGFzc2VydGlvbiB0ZXN0MB4XDTE0MDEw
    +MTAwMDAwMFoXDTMwMDEwMTAwMDAwMFowIzEhMB8GA1UEAwwYVVJJLWVtcHR5IGFz
    +c2VydGlvbiB0ZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArzIB
    +E4WYhfFNJk2VcvxTX9+cdyJ+v+GCAU4BxSJ1/97BPf3UN4yob23qohnnnMlGAO2x
    +QBK2VBQKjNZo3qwy2t5xhsa0YLjjWGxAEL1s5K8cQlkYwkciTy+RFpMXmM80kk8p
    +ZdZFgrjf5ltincH4QuhJcN3/fsEibHQibymWeb/0I3Mba6Uh+gssMN82NYETl677
    +I+5HV4wgJWMh1vaZFbid+YFBeWWJoIAIdbTQEAwIJriTA43lgbcK0Lo9A8/RCH1O
    +RVsQSkpA3kfs9yJ9AvKglBIThapR1iRgtVsC9LdiauHmiNU+8POSHXWByXaWOK0o
    +Izfg/lI+xKSWJerhUwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQA+/3kRE6jYFfgy
    +vHZdOX2cFOA5Y0N/RZmdt34tsfCiqP2vHtfQUje8gQAhjmV6dFk4wptPF1FsP601
    +bMp+9LsRsb4y6pxy5m7xKVK9P/EI33N2zZZL9tlJ7CPIA81DPi53lYOvX54UIi2I
    +GpF6QyYMX2HTs/KVxo4gYnOnkyqPw6QrKaWpJLQndQd1rTn4/ybWW/9XU46RYf7/
    +7Z8H8t4n4lhPYm5WGer4eG+k+F3R04yhwSm3Wi91gkQwQdGPgFSPe1z8TusDw/Q/
    +1ax1a/mNoN9NCcZgg3L0xZgbtDnzBr/Gd/MWBQdDgRM7DpcWaVVcXq5GRLLeAvwM
    +uF73araE
    +-----END CERTIFICATE-----
    
  • authentik/sources/saml/tests/fixtures/signature_cert_uri_empty.pem+17 0 added
    @@ -0,0 +1,17 @@
    +-----BEGIN CERTIFICATE-----
    +MIICvjCCAaagAwIBAgIUGjmjYk5z7ya8VH2Faah5vvVmEHIwDQYJKoZIhvcNAQEL
    +BQAwGTEXMBUGA1UEAwwOVVJJLWVtcHR5IHRlc3QwHhcNMTQwMTAxMDAwMDAwWhcN
    +MzAwMTAxMDAwMDAwWjAZMRcwFQYDVQQDDA5VUkktZW1wdHkgdGVzdDCCASIwDQYJ
    +KoZIhvcNAQEBBQADggEPADCCAQoCggEBAKEuJi9Gny9OfQScZEG1R9Gy5pqbM7it
    +pGda6gm4PXuFQisMapdg0DwO3odY1grTQE6gFEjSCYtEoGyuJMSUNdILvc7sfCWa
    +QkuXCnkx7nXgyiHLNuhgkhw6kDXgRMzdaI/B7IlZkZYnfyXWi6A6lQ6dLJRU1p0o
    +C+JawKngvmOAAKvhaC1keEbfUh//8UhK/YkjJShV1c0ijFlucj4eYDQyf9x9lYw7
    +oukjnVFKmhqiRO/SxwhYjYbyTppVRzC4sCJz0KRn4qwnGV5x2+jDqUvFUxJc5W7f
    +N+utrfNWeszmP5Elw+ezIsq+3D9ss+nHmtXIDxVNA3dp8tZQKzQ4WzcCAwEAATAN
    +BgkqhkiG9w0BAQsFAAOCAQEART2PW/rXPU5d+NTJnP2mdIi5Ft01gpaRgY1iBsFm
    ++D6zXT/k9wr56GEDLWUf2qOJeXsNc+f9FKI0BCVb/5vVoB60AAMHKbb+NxwoXLHi
    +dT6DaEPK1VGdEBnpL5uOII3pO42FMPewBUNuoUmb9zipyPoL6zbc7khRcBBIYMlr
    +05Y2tqJqECNAtGQ9+v5CBcECP3QI4L0UmCJMwpj7XH5TrfKfLPZuUEvQaET63dXb
    +ioi+P6KEpuxblOL0Uj2e2erhJYavqCnoxt+0eUDDBsrwuk7/sRtbBO0XjkgEtJZ8
    +n3OS74cjqIwTx+PqObGThECnyBYwONY7RWU5G4r6kqMXBg==
    +-----END CERTIFICATE-----
    
  • authentik/sources/saml/tests/test_response.py+114 2 modified
    @@ -196,10 +196,122 @@ def test_verification_assertion_duplicate(self):
             self.assertNotEqual(parser._get_name_id()[1], "bad")
             self.assertEqual(parser._get_name_id()[1], "_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7")
     
    -    @freeze_time("2022-10-14T14:15:00")
    +    @freeze_time("2014-07-17T01:02:18Z")
    +    def test_verification_assertion_xsw_nested_duplicate_id(self):
    +        """Nested-duplicate-ID XSW: a forged outer Assertion shares its ID with a
    +        nested copy of the original signed Assertion (placed inside <saml:Advice>),
    +        so the Signature's Reference URI (#ORIG_ID) matches the outer Assertion's
    +        ID *and* dereferences to legitimately-signed content. Must be rejected."""
    +        key = load_fixture("fixtures/signature_cert.pem")
    +        kp = CertificateKeyPair.objects.create(
    +            name=generate_id(),
    +            certificate_data=key,
    +        )
    +        self.source.verification_kp = kp
    +        self.source.signed_assertion = True
    +        self.source.signed_response = False
    +        request = self.factory.post(
    +            "/",
    +            data={
    +                "SAMLResponse": b64encode(
    +                    load_fixture("fixtures/response_signed_assertion_xsw_nested.xml").encode()
    +                ).decode()
    +            },
    +        )
    +
    +        parser = ResponseProcessor(self.source, request)
    +        with self.assertRaises(InvalidSignature):
    +            parser.parse()
    +
    +    @freeze_time("2014-07-17T01:02:18Z")
    +    def test_verification_response_uri_empty(self):
    +        """Some real-world IdPs (notably some Okta dev-tenant configurations
    +        observed in the gosaml2 testdata corpus at saml.oktadev.com) sign the
    +        Response with ds:Reference URI="" instead of URI="#<ID>". Per xmldsig
    +        §4.4.3.2, URI="" covers the entire enclosing document via the
    +        enveloped-signature transform — strictly more attested content than
    +        "#<ID>" — so consuming the target is a subset of what was signed."""
    +        key = load_fixture("fixtures/signature_cert_uri_empty.pem")
    +        kp = CertificateKeyPair.objects.create(
    +            name=generate_id(),
    +            certificate_data=key,
    +        )
    +        self.source.verification_kp = kp
    +        self.source.signed_response = True
    +        self.source.signed_assertion = False
    +        request = self.factory.post(
    +            "/",
    +            data={
    +                "SAMLResponse": b64encode(
    +                    load_fixture("fixtures/response_signed_response_uri_empty.xml").encode()
    +                ).decode()
    +            },
    +        )
    +
    +        parser = ResponseProcessor(self.source, request)
    +        parser.parse()
    +
    +    @freeze_time("2014-07-17T01:02:18Z")
    +    def test_verification_assertion_uri_empty(self):
    +        """Symmetric to test_verification_response_uri_empty but for an
    +        Assertion-level signature: the same xmldsig "this document" semantics
    +        still cover the whole enclosing document, so the Assertion we then
    +        consume is part of the attested content. We have no real-world IdP
    +        samples emitting this configuration, but the pre-fix code accepted it
    +        and the cryptographic guarantee holds, so keep accepting it rather
    +        than risk breaking an IdP we haven't sampled."""
    +        key = load_fixture("fixtures/signature_cert_assertion_uri_empty.pem")
    +        kp = CertificateKeyPair.objects.create(
    +            name=generate_id(),
    +            certificate_data=key,
    +        )
    +        self.source.verification_kp = kp
    +        self.source.signed_assertion = True
    +        self.source.signed_response = False
    +        request = self.factory.post(
    +            "/",
    +            data={
    +                "SAMLResponse": b64encode(
    +                    load_fixture("fixtures/response_signed_assertion_uri_empty.xml").encode()
    +                ).decode()
    +            },
    +        )
    +
    +        parser = ResponseProcessor(self.source, request)
    +        parser.parse()
    +
    +    @freeze_time("2014-07-17T01:02:18Z")
    +    def test_verification_assertion_xsw3(self):
    +        """XSW-3 (signature relocation): a forged Assertion contains a Signature whose
    +        ds:Reference URI points to a second Assertion in the document. The signature
    +        verifies (because the digest matches the legitimate referenced Assertion),
    +        but the verifier must NOT then consume the forged Assertion as if it were
    +        signed."""
    +        key = load_fixture("fixtures/signature_cert.pem")
    +        kp = CertificateKeyPair.objects.create(
    +            name=generate_id(),
    +            certificate_data=key,
    +        )
    +        self.source.verification_kp = kp
    +        self.source.signed_assertion = True
    +        self.source.signed_response = False
    +        request = self.factory.post(
    +            "/",
    +            data={
    +                "SAMLResponse": b64encode(
    +                    load_fixture("fixtures/response_signed_assertion_xsw3.xml").encode()
    +                ).decode()
    +            },
    +        )
    +
    +        parser = ResponseProcessor(self.source, request)
    +        with self.assertRaises(InvalidSignature):
    +            parser.parse()
    +
    +    @freeze_time("2014-07-17T01:02:18Z")
         def test_name_id_comment(self):
             """Test comment in name ID"""
    -        fixture = load_fixture("fixtures/response_signed_assertion_dup.xml")
    +        fixture = load_fixture("fixtures/response_signed_assertion.xml")
             fixture = fixture.replace(
                 "_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7",
                 "_ce3d2948b4cf20146dee0a0b3dd6f<!--x-->69b6cf86f62d7",
    
  • locale/en/dictionaries/software-terms.txt+2 0 modified
    @@ -93,6 +93,7 @@ frie
     gcsp
     geoip
     glpi
    +gosaml
     grecaptcha
     guac
     guacd
    @@ -113,6 +114,7 @@ microsoft
     mmdb
     noopener
     noreferrer
    +oktadev
     openidc
     ouia
     ouid
    
  • website/docs/security/cves/CVE-2026-47201.md+31 0 added
    @@ -0,0 +1,31 @@
    +# CVE-2026-47201
    +
    +## XML Signature Wrapping in SAML Source ACS allows authentication as arbitrary federated user
    +
    +### Summary
    +
    +authentik's SAML Source ACS endpoint is vulnerable to XML Signature Wrapping when validating upstream SAML responses. An attacker with any account at the upstream IdP can reuse a valid signed assertion to authenticate as another federated user.
    +
    +### Patches
    +
    +authentik 2026.5.1, 2026.2.4 and 2025.12.6 fix this issue.
    +
    +### Impact
    +
    +Affected: authentik deployments using a SAML Source for upstream SAML federation with signed assertions, or signed responses without signed assertions. Not affected: deployments that do not use SAML Source for upstream SAML federation.
    +
    +The SAML Source trusts that the verified XML signature belongs to the assertion or response that authentik later consumes. A crafted SAML response can make signature verification succeed against the attacker's original signed assertion while authentik reads identity data from a different forged assertion.
    +
    +An attacker first completes a legitimate login to the upstream IdP and captures the signed SAML response sent through their browser. They then submit a modified response to the ACS endpoint where the valid signature still verifies, but the consumed assertion contains a victim identifier or attacker-chosen attributes.
    +
    +The attacker can authenticate as a victim who has previously used the SAML Source, or as a local user matched by forged email or username when those matching modes are enabled.
    +
    +### Workarounds
    +
    +Disable affected SAML Sources, or block access to their ACS endpoints.
    +
    +### For more information
    +
    +If you have any questions or comments about this advisory:
    +
    +- Email us at [security@goauthentik.io](mailto:security@goauthentik.io)
    
a370d76d23c7

security: automated internal backport of patch GHSA-c3m2-jqmq-pvp3.sec.patch to authentik-main (#22732)

https://github.com/goauthentik/authentikauthentik-automation[bot]May 28, 2026via text-mined
10 files changed · +392 14
  • authentik/sources/saml/processors/response.py+22 12 modified
    @@ -143,9 +143,21 @@ def _verify_conditions(self):
                 if datetime.fromisoformat(on_or_after).replace(tzinfo=UTC) < _now:
                     raise SAMLException("Assertion is not valid yet or expired.")
     
    -    def _verify_signature(self, signature_node: _Element):
    -        """Verify a single signature node"""
    -        xmlsec.tree.add_ids(self._root, ["ID"])
    +    def _verify_signature(self, signature_node: _Element, target: _Element):
    +        """Verify a single signature node against the given target element."""
    +        target_id = target.attrib.get("ID")
    +        if not target_id:
    +            raise InvalidSignature("Signed element is missing an ID attribute.")
    +        refs = signature_node.xpath("./ds:SignedInfo/ds:Reference", namespaces=NS_MAP)
    +        if len(refs) != 1:
    +            raise InvalidSignature("Signature must contain exactly one Reference.")
    +        ref_uri = refs[0].get("URI", "")
    +        if ref_uri not in ("", f"#{target_id}"):
    +            raise InvalidSignature(
    +                "Signature Reference URI does not match the signed element's ID."
    +            )
    +
    +        xmlsec.tree.add_ids(target, ["ID"])
     
             ctx = xmlsec.SignatureContext()
             key = xmlsec.Key.from_memory(
    @@ -168,24 +180,22 @@ def _verify_response_signature(self):
             signature_nodes = self._root.xpath("/samlp:Response/ds:Signature", namespaces=NS_MAP)
     
             if len(signature_nodes) != 1:
    -            raise InvalidSignature("No Signature exists in the Response element.")
    +            raise InvalidSignature("Expected exactly one Signature in the Response element.")
     
    -        self._verify_signature(signature_nodes[0])
    +        self._verify_signature(signature_nodes[0], self._root)
     
         def _verify_assertion_signature(self):
             """Verify SAML Assertion's Signature (after decryption)"""
             signature_nodes = self._root.xpath(
                 "/samlp:Response/saml:Assertion/ds:Signature", namespaces=NS_MAP
             )
    -
             if len(signature_nodes) != 1:
    -            raise InvalidSignature("No Signature exists in the Assertion element.")
    +            raise InvalidSignature("Expected exactly one signed Assertion in the Response.")
    +        signature_node = signature_nodes[0]
    +        assertion = signature_node.getparent()
     
    -        self._verify_signature(signature_nodes[0])
    -        parent = signature_nodes[0].getparent()
    -        if parent is None or parent.tag != f"{{{NS_SAML_ASSERTION}}}Assertion":
    -            raise InvalidSignature("No Signature exists in the Assertion element.")
    -        self._assertion = parent
    +        self._verify_signature(signature_node, assertion)
    +        self._assertion = assertion
     
         def _verify_request_id(self):
             if self._source.allow_idp_initiated:
    
  • authentik/sources/saml/tests/fixtures/response_signed_assertion_uri_empty.xml+41 0 added
    @@ -0,0 +1,41 @@
    +<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_resp_assert_uri_empty" Version="2.0" IssueInstant="2014-07-17T01:01:48Z" Destination="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"><saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer><samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:Status><saml:Assertion ID="_assert" Version="2.0" IssueInstant="2014-07-17T01:01:48Z"><saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer><Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    +<SignedInfo>
    +<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    +<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
    +<Reference URI="">
    +<Transforms>
    +<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
    +<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    +</Transforms>
    +<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
    +<DigestValue>6AZlgEwsPEWwPPioj5HiNRStaPAm70zIRSBGnYaRc+E=</DigestValue>
    +</Reference>
    +</SignedInfo>
    +<SignatureValue>fei+JUaTHlQuy6/icjyZKUh5kx9qvL5xEqUfwOa1kiLtlfCbMCcEFHMEjePb1uPW
    +fAePa/v9mIl8pV7TrALI1xicdwRPvvM6xgiWe5hQDU+MKd88bHuU/O/0DUktku+e
    +ANR4kYQUAgkmmMCSPSruD3zIgVTAI8AMEpTtDNuHr8C12phsDkqaRQ1OP/ptC//2
    +s6eeJ0DizMWkv/UHrqN8PSoTSgIl30Ffq30t/9TY644lBjgcQZD4h0uvpaRo/M0/
    +yxcgfP6U3ec9ucePFJKprNXvkmNSh/DGbA0BPx1zoB7xf1nhyIYZI76GqC1NP0rh
    +YQ1BinW++XE19PvY66MnIA==</SignatureValue>
    +<KeyInfo>
    +<X509Data>
    +<X509Certificate>MIIC0jCCAbqgAwIBAgIUXHr2/LJAqtsJ4CcXkFjMwJo8HmQwDQYJKoZIhvcNAQEL
    +BQAwIzEhMB8GA1UEAwwYVVJJLWVtcHR5IGFzc2VydGlvbiB0ZXN0MB4XDTE0MDEw
    +MTAwMDAwMFoXDTMwMDEwMTAwMDAwMFowIzEhMB8GA1UEAwwYVVJJLWVtcHR5IGFz
    +c2VydGlvbiB0ZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArzIB
    +E4WYhfFNJk2VcvxTX9+cdyJ+v+GCAU4BxSJ1/97BPf3UN4yob23qohnnnMlGAO2x
    +QBK2VBQKjNZo3qwy2t5xhsa0YLjjWGxAEL1s5K8cQlkYwkciTy+RFpMXmM80kk8p
    +ZdZFgrjf5ltincH4QuhJcN3/fsEibHQibymWeb/0I3Mba6Uh+gssMN82NYETl677
    +I+5HV4wgJWMh1vaZFbid+YFBeWWJoIAIdbTQEAwIJriTA43lgbcK0Lo9A8/RCH1O
    +RVsQSkpA3kfs9yJ9AvKglBIThapR1iRgtVsC9LdiauHmiNU+8POSHXWByXaWOK0o
    +Izfg/lI+xKSWJerhUwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQA+/3kRE6jYFfgy
    +vHZdOX2cFOA5Y0N/RZmdt34tsfCiqP2vHtfQUje8gQAhjmV6dFk4wptPF1FsP601
    +bMp+9LsRsb4y6pxy5m7xKVK9P/EI33N2zZZL9tlJ7CPIA81DPi53lYOvX54UIi2I
    +GpF6QyYMX2HTs/KVxo4gYnOnkyqPw6QrKaWpJLQndQd1rTn4/ybWW/9XU46RYf7/
    +7Z8H8t4n4lhPYm5WGer4eG+k+F3R04yhwSm3Wi91gkQwQdGPgFSPe1z8TusDw/Q/
    +1ax1a/mNoN9NCcZgg3L0xZgbtDnzBr/Gd/MWBQdDgRM7DpcWaVVcXq5GRLLeAvwM
    +uF73araE
    +</X509Certificate>
    +</X509Data>
    +</KeyInfo>
    +</Signature><saml:Subject><saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">test_user</saml:NameID><saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"><saml:SubjectConfirmationData NotOnOrAfter="2024-01-18T06:21:48Z" Recipient="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"/></saml:SubjectConfirmation></saml:Subject><saml:Conditions NotBefore="2014-07-17T01:01:18Z" NotOnOrAfter="2024-01-18T06:21:48Z"><saml:AudienceRestriction><saml:Audience>http://sp.example.com/demo1/metadata.php</saml:Audience></saml:AudienceRestriction></saml:Conditions><saml:AuthnStatement AuthnInstant="2014-07-17T01:01:48Z" SessionIndex="_session"><saml:AuthnContext><saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml:AuthnContextClassRef></saml:AuthnContext></saml:AuthnStatement></saml:Assertion></samlp:Response>
    \ No newline at end of file
    
  • authentik/sources/saml/tests/fixtures/response_signed_assertion_xsw3.xml+72 0 added
    @@ -0,0 +1,72 @@
    +<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_8e8dc5f69a98cc4c1ff3427e5ce34606fd672f91e6" Version="2.0" IssueInstant="2014-07-17T01:01:48Z" Destination="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685">
    +  <saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer>
    +  <samlp:Status>
    +    <samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
    +  </samlp:Status>
    +  <saml:Assertion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" ID="_evil" Version="2.0" IssueInstant="2014-07-17T01:01:48Z">
    +    <saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    +  <ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    +    <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
    +  <ds:Reference URI="#pfxa06693ef-cec7-f4a6-cb7f-ad074445a1a3"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>zNDuGxwP4gVkv/Dzt7kiKo/4gzk=</ds:DigestValue></ds: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oWqx2tkm6HGXd3fbpfQlnfrRN60tMjjLmw1cDMhOhpdragY5zokniEUL2pKVtrxFp7V1ZpoMI0Kt5MKkOXrezi542NWSgkGehlsDLD9wtuCNem2arR0mNnMLdYkMG7G0dpAq3Tl32dgfMfyKnNyE2O/6/EeEuzUH2NfTU1p7AUQfLrf4rtNcJEs9OAPuC9vy7w9YEpF997T+FhR2Ub1C423NQj4bwlS/9f7MIBkSi1EgnQuiSGB5epxAKI3oOVrmzOpTuvr6wZXV9pM3zdfbcoGuFWP6Ix7W8G5vg+0WvoSjc2fwGXYlidEK3xlQSMAaQ4CMClpPsKLScRq1nrQGzPYoiL1DYubsOWx9ohll6+jNjKI6f79WwbHYrW4EeRIOz38+m46EDjAWZBMgrE7J/3DhgeLEVJYBA5K0=</ds:X509Certificate></ds:X509Data></ds:KeyInfo></ds:Signature>
    +    <saml:Subject>
    +      <saml:NameID SPNameQualifier="http://sp.example.com/demo1/metadata.php" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">ATTACKER_FORGED_NAMEID</saml:NameID>
    +      <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
    +        <saml:SubjectConfirmationData NotOnOrAfter="2024-01-18T06:21:48Z" Recipient="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"/>
    +      </saml:SubjectConfirmation>
    +    </saml:Subject>
    +    <saml:Conditions NotBefore="2014-07-17T01:01:18Z" NotOnOrAfter="2024-01-18T06:21:48Z">
    +      <saml:AudienceRestriction>
    +        <saml:Audience>http://sp.example.com/demo1/metadata.php</saml:Audience>
    +      </saml:AudienceRestriction>
    +    </saml:Conditions>
    +    <saml:AuthnStatement AuthnInstant="2014-07-17T01:01:48Z" SessionNotOnOrAfter="2024-07-17T09:01:48Z" SessionIndex="_be9967abd904ddcae3c0eb4189adbe3f71e327cf93">
    +      <saml:AuthnContext>
    +        <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml:AuthnContextClassRef>
    +      </saml:AuthnContext>
    +    </saml:AuthnStatement>
    +    <saml:AttributeStatement>
    +      <saml:Attribute Name="uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">ATTACKER_FORGED</saml:AttributeValue>
    +      </saml:Attribute>
    +      <saml:Attribute Name="mail" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">ATTACKER_FORGED</saml:AttributeValue>
    +      </saml:Attribute>
    +      <saml:Attribute Name="eduPersonAffiliation" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">ATTACKER_FORGED</saml:AttributeValue>
    +        <saml:AttributeValue xsi:type="xs:string">ATTACKER_FORGED</saml:AttributeValue>
    +      </saml:Attribute>
    +    </saml:AttributeStatement>
    +  </saml:Assertion>
    +<saml:Assertion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" ID="pfxa06693ef-cec7-f4a6-cb7f-ad074445a1a3" Version="2.0" IssueInstant="2014-07-17T01:01:48Z">
    +    <saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer>
    +    <saml:Subject>
    +      <saml:NameID SPNameQualifier="http://sp.example.com/demo1/metadata.php" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7</saml:NameID>
    +      <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
    +        <saml:SubjectConfirmationData NotOnOrAfter="2024-01-18T06:21:48Z" Recipient="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"/>
    +      </saml:SubjectConfirmation>
    +    </saml:Subject>
    +    <saml:Conditions NotBefore="2014-07-17T01:01:18Z" NotOnOrAfter="2024-01-18T06:21:48Z">
    +      <saml:AudienceRestriction>
    +        <saml:Audience>http://sp.example.com/demo1/metadata.php</saml:Audience>
    +      </saml:AudienceRestriction>
    +    </saml:Conditions>
    +    <saml:AuthnStatement AuthnInstant="2014-07-17T01:01:48Z" SessionNotOnOrAfter="2024-07-17T09:01:48Z" SessionIndex="_be9967abd904ddcae3c0eb4189adbe3f71e327cf93">
    +      <saml:AuthnContext>
    +        <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml:AuthnContextClassRef>
    +      </saml:AuthnContext>
    +    </saml:AuthnStatement>
    +    <saml:AttributeStatement>
    +      <saml:Attribute Name="uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">test</saml:AttributeValue>
    +      </saml:Attribute>
    +      <saml:Attribute Name="mail" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">test@example.com</saml:AttributeValue>
    +      </saml:Attribute>
    +      <saml:Attribute Name="eduPersonAffiliation" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">users</saml:AttributeValue>
    +        <saml:AttributeValue xsi:type="xs:string">examplerole1</saml:AttributeValue>
    +      </saml:Attribute>
    +    </saml:AttributeStatement>
    +  </saml:Assertion>
    +</samlp:Response>
    
  • authentik/sources/saml/tests/fixtures/response_signed_assertion_xsw_nested.xml+35 0 added
    @@ -0,0 +1,35 @@
    +<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_resp" Version="2.0" IssueInstant="2014-07-17T01:01:48Z" Destination="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"><saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer><samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:Status><saml:Assertion ID="pfxa06693ef-cec7-f4a6-cb7f-ad074445a1a3" Version="2.0" IssueInstant="2014-07-17T01:01:48Z"><saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    +  <ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    +    <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
    +  <ds:Reference URI="#pfxa06693ef-cec7-f4a6-cb7f-ad074445a1a3"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>zNDuGxwP4gVkv/Dzt7kiKo/4gzk=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>GLP/vE8uxerB0uDpPslUgLPBL6ePQB619MoQ0I2Y5lAtFE6CB1zh8BnzChRx/bFjNy4byfOe8mFfM0r7WUi1PJOFWyUPoatdLl7wHHBIRTnPpYmu3Tb2Gz0sOP0F8wW7JkBft5gJfVw49nk5si9/3Q3o52jnJZ7dPtqfIOh8uNeopikK0HLF6sU05qCCtjcXfniEnLQFNBFMo9uY5GQqmR5n3nqPz1wYyyfFOAbVmGgBIoO2PfGX2GVLQhltc9qf2JMhks4jgZsZ8iLUIiH1lcLGWZEEs94k8k0P6gSv1uZ7Vbhksd/N9Jq9pCVuEJ/jRPcAdVjzbxqKQAj6ELwr8O6fepTzA+CAdwEolBnx/C6TmSbVZ+IWk6QUGe4x4+IAukC+0hkKENlO0ELOScksvyhpgHbxNA4rp+DhGupCaO/I2RrsQkmvavbqm+wSEspK7scK112SDunjDvqPHsPYgukD33T/97PxTLorg2kKP9HHJwPJKoXXeyOGcA6vw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N2VzQbkHAgK3s4YRXrGLTs7wg27F9T0RE28Mm0RYBkYpdp4/5PuTTulthB9mkUBSJMgENmQAYkapvonFDsJkTi39qnsddbZusOLT4z3hsA38eFEwRqnbNZVUGPIp/O1SsCAwEAAaNVMFMwUQYDVR0RAQH/BEcwRYJDRUZ4QXVLRzV6SlVUTWpWNTJoMkRJMUQ5MXdLblZKaXFwNmpwRTRTTy5zZWxmLXNpZ25lZC5nb2F1dGhlbnRpay5pbzANBgkqhkiG9w0BAQsFAAOCAgEAYLThxDVpA1OIAVK/buueRJExIWr6y4s6NtpuR8UQEcfq5hfoc4zMFGHR5+u1WFIb5siK25xh/OnS7bLdLic6AkjZSrx91+0v2Jn9gfUqbs5AJ040XzAAdx/Mb4s0+537yhB+/JXPylR1QxhGbO7koXQ5JDhAXWKCw2O1C+80mN8dbhQvDkEtsXrHrtXclcqf2TT89XAzc5HAC8NmP4SF+FafAREQB1KdaG4QAbc/gnjsX2YJD89SDL+3jMp6F7R1Ym+bWt5oWqx2tkm6HGXd3fbpfQlnfrRN60tMjjLmw1cDMhOhpdragY5zokniEUL2pKVtrxFp7V1ZpoMI0Kt5MKkOXrezi542NWSgkGehlsDLD9wtuCNem2arR0mNnMLdYkMG7G0dpAq3Tl32dgfMfyKnNyE2O/6/EeEuzUH2NfTU1p7AUQfLrf4rtNcJEs9OAPuC9vy7w9YEpF997T+FhR2Ub1C423NQj4bwlS/9f7MIBkSi1EgnQuiSGB5epxAKI3oOVrmzOpTuvr6wZXV9pM3zdfbcoGuFWP6Ix7W8G5vg+0WvoSjc2fwGXYlidEK3xlQSMAaQ4CMClpPsKLScRq1nrQGzPYoiL1DYubsOWx9ohll6+jNjKI6f79WwbHYrW4EeRIOz38+m46EDjAWZBMgrE7J/3DhgeLEVJYBA5K0=</ds:X509Certificate></ds:X509Data></ds:KeyInfo></ds:Signature><saml:Subject><saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">FORGED_VICTIM</saml:NameID></saml:Subject><saml:Conditions NotBefore="2014-07-17T01:01:18Z" NotOnOrAfter="2024-01-18T06:21:48Z"><saml:AudienceRestriction><saml:Audience>http://sp.example.com/demo1/metadata.php</saml:Audience></saml:AudienceRestriction></saml:Conditions><saml:Advice><saml:Assertion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" ID="pfxa06693ef-cec7-f4a6-cb7f-ad074445a1a3" Version="2.0" IssueInstant="2014-07-17T01:01:48Z">
    +    <saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer>
    +    <saml:Subject>
    +      <saml:NameID SPNameQualifier="http://sp.example.com/demo1/metadata.php" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7</saml:NameID>
    +      <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
    +        <saml:SubjectConfirmationData NotOnOrAfter="2024-01-18T06:21:48Z" Recipient="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"/>
    +      </saml:SubjectConfirmation>
    +    </saml:Subject>
    +    <saml:Conditions NotBefore="2014-07-17T01:01:18Z" NotOnOrAfter="2024-01-18T06:21:48Z">
    +      <saml:AudienceRestriction>
    +        <saml:Audience>http://sp.example.com/demo1/metadata.php</saml:Audience>
    +      </saml:AudienceRestriction>
    +    </saml:Conditions>
    +    <saml:AuthnStatement AuthnInstant="2014-07-17T01:01:48Z" SessionNotOnOrAfter="2024-07-17T09:01:48Z" SessionIndex="_be9967abd904ddcae3c0eb4189adbe3f71e327cf93">
    +      <saml:AuthnContext>
    +        <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml:AuthnContextClassRef>
    +      </saml:AuthnContext>
    +    </saml:AuthnStatement>
    +    <saml:AttributeStatement>
    +      <saml:Attribute Name="uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">test</saml:AttributeValue>
    +      </saml:Attribute>
    +      <saml:Attribute Name="mail" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">test@example.com</saml:AttributeValue>
    +      </saml:Attribute>
    +      <saml:Attribute Name="eduPersonAffiliation" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
    +        <saml:AttributeValue xsi:type="xs:string">users</saml:AttributeValue>
    +        <saml:AttributeValue xsi:type="xs:string">examplerole1</saml:AttributeValue>
    +      </saml:Attribute>
    +    </saml:AttributeStatement>
    +  </saml:Assertion></saml:Advice></saml:Assertion></samlp:Response>
    \ No newline at end of file
    
  • authentik/sources/saml/tests/fixtures/response_signed_response_uri_empty.xml+40 0 added
    @@ -0,0 +1,40 @@
    +<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_resp_uri_empty" Version="2.0" IssueInstant="2014-07-17T01:01:48Z" Destination="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"><saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer><Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    +<SignedInfo>
    +<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    +<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
    +<Reference URI="">
    +<Transforms>
    +<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
    +<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    +</Transforms>
    +<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
    +<DigestValue>h6La1VQZ6VO/Bi/a3g2Uhkp27kV1ijJvIB6xlgLGu7M=</DigestValue>
    +</Reference>
    +</SignedInfo>
    +<SignatureValue>ItqDe3xfN9sN44z9pudYI+GdVEz7MnLXvG3+afjS8ws52c8fUryoK0lgH3l0i3mY
    +cFKiQwiuRx86AB6uGH13ToOoXq3peK911PeGZ/fCt15x14x6v69r9vG+Mw4KAc+y
    +7J/a3BOltEoU9SfNHBAIkEgbHP35bF5iYSVlIfLho8BRCVT4rMv/K/n65Hd88Fas
    +Es2oxS95hYUf1of9pHDOuvEYM+VpMZw3OuMci7X8ZszCxdJbgP6D4m7w9wWBbAAi
    +xWWuLnU2sFkLNeBh5KuumLNLG1Dreqiz0d4/tu+P9F4NcP2FAdG79/Y+Ga9d0Wf7
    +yf05WcieZgV4hhHNwQcauw==</SignatureValue>
    +<KeyInfo>
    +<X509Data>
    +<X509Certificate>MIICvjCCAaagAwIBAgIUGjmjYk5z7ya8VH2Faah5vvVmEHIwDQYJKoZIhvcNAQEL
    +BQAwGTEXMBUGA1UEAwwOVVJJLWVtcHR5IHRlc3QwHhcNMTQwMTAxMDAwMDAwWhcN
    +MzAwMTAxMDAwMDAwWjAZMRcwFQYDVQQDDA5VUkktZW1wdHkgdGVzdDCCASIwDQYJ
    +KoZIhvcNAQEBBQADggEPADCCAQoCggEBAKEuJi9Gny9OfQScZEG1R9Gy5pqbM7it
    +pGda6gm4PXuFQisMapdg0DwO3odY1grTQE6gFEjSCYtEoGyuJMSUNdILvc7sfCWa
    +QkuXCnkx7nXgyiHLNuhgkhw6kDXgRMzdaI/B7IlZkZYnfyXWi6A6lQ6dLJRU1p0o
    +C+JawKngvmOAAKvhaC1keEbfUh//8UhK/YkjJShV1c0ijFlucj4eYDQyf9x9lYw7
    +oukjnVFKmhqiRO/SxwhYjYbyTppVRzC4sCJz0KRn4qwnGV5x2+jDqUvFUxJc5W7f
    +N+utrfNWeszmP5Elw+ezIsq+3D9ss+nHmtXIDxVNA3dp8tZQKzQ4WzcCAwEAATAN
    +BgkqhkiG9w0BAQsFAAOCAQEART2PW/rXPU5d+NTJnP2mdIi5Ft01gpaRgY1iBsFm
    ++D6zXT/k9wr56GEDLWUf2qOJeXsNc+f9FKI0BCVb/5vVoB60AAMHKbb+NxwoXLHi
    +dT6DaEPK1VGdEBnpL5uOII3pO42FMPewBUNuoUmb9zipyPoL6zbc7khRcBBIYMlr
    +05Y2tqJqECNAtGQ9+v5CBcECP3QI4L0UmCJMwpj7XH5TrfKfLPZuUEvQaET63dXb
    +ioi+P6KEpuxblOL0Uj2e2erhJYavqCnoxt+0eUDDBsrwuk7/sRtbBO0XjkgEtJZ8
    +n3OS74cjqIwTx+PqObGThECnyBYwONY7RWU5G4r6kqMXBg==
    +</X509Certificate>
    +</X509Data>
    +</KeyInfo>
    +</Signature><samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:Status><saml:Assertion ID="_assert" Version="2.0" IssueInstant="2014-07-17T01:01:48Z"><saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer><saml:Subject><saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">test_user</saml:NameID><saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"><saml:SubjectConfirmationData NotOnOrAfter="2024-01-18T06:21:48Z" Recipient="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"/></saml:SubjectConfirmation></saml:Subject><saml:Conditions NotBefore="2014-07-17T01:01:18Z" NotOnOrAfter="2024-01-18T06:21:48Z"><saml:AudienceRestriction><saml:Audience>http://sp.example.com/demo1/metadata.php</saml:Audience></saml:AudienceRestriction></saml:Conditions><saml:AuthnStatement AuthnInstant="2014-07-17T01:01:48Z" SessionIndex="_session"><saml:AuthnContext><saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml:AuthnContextClassRef></saml:AuthnContext></saml:AuthnStatement></saml:Assertion></samlp:Response>
    \ No newline at end of file
    
  • authentik/sources/saml/tests/fixtures/signature_cert_assertion_uri_empty.pem+18 0 added
    @@ -0,0 +1,18 @@
    +-----BEGIN CERTIFICATE-----
    +MIIC0jCCAbqgAwIBAgIUXHr2/LJAqtsJ4CcXkFjMwJo8HmQwDQYJKoZIhvcNAQEL
    +BQAwIzEhMB8GA1UEAwwYVVJJLWVtcHR5IGFzc2VydGlvbiB0ZXN0MB4XDTE0MDEw
    +MTAwMDAwMFoXDTMwMDEwMTAwMDAwMFowIzEhMB8GA1UEAwwYVVJJLWVtcHR5IGFz
    +c2VydGlvbiB0ZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArzIB
    +E4WYhfFNJk2VcvxTX9+cdyJ+v+GCAU4BxSJ1/97BPf3UN4yob23qohnnnMlGAO2x
    +QBK2VBQKjNZo3qwy2t5xhsa0YLjjWGxAEL1s5K8cQlkYwkciTy+RFpMXmM80kk8p
    +ZdZFgrjf5ltincH4QuhJcN3/fsEibHQibymWeb/0I3Mba6Uh+gssMN82NYETl677
    +I+5HV4wgJWMh1vaZFbid+YFBeWWJoIAIdbTQEAwIJriTA43lgbcK0Lo9A8/RCH1O
    +RVsQSkpA3kfs9yJ9AvKglBIThapR1iRgtVsC9LdiauHmiNU+8POSHXWByXaWOK0o
    +Izfg/lI+xKSWJerhUwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQA+/3kRE6jYFfgy
    +vHZdOX2cFOA5Y0N/RZmdt34tsfCiqP2vHtfQUje8gQAhjmV6dFk4wptPF1FsP601
    +bMp+9LsRsb4y6pxy5m7xKVK9P/EI33N2zZZL9tlJ7CPIA81DPi53lYOvX54UIi2I
    +GpF6QyYMX2HTs/KVxo4gYnOnkyqPw6QrKaWpJLQndQd1rTn4/ybWW/9XU46RYf7/
    +7Z8H8t4n4lhPYm5WGer4eG+k+F3R04yhwSm3Wi91gkQwQdGPgFSPe1z8TusDw/Q/
    +1ax1a/mNoN9NCcZgg3L0xZgbtDnzBr/Gd/MWBQdDgRM7DpcWaVVcXq5GRLLeAvwM
    +uF73araE
    +-----END CERTIFICATE-----
    
  • authentik/sources/saml/tests/fixtures/signature_cert_uri_empty.pem+17 0 added
    @@ -0,0 +1,17 @@
    +-----BEGIN CERTIFICATE-----
    +MIICvjCCAaagAwIBAgIUGjmjYk5z7ya8VH2Faah5vvVmEHIwDQYJKoZIhvcNAQEL
    +BQAwGTEXMBUGA1UEAwwOVVJJLWVtcHR5IHRlc3QwHhcNMTQwMTAxMDAwMDAwWhcN
    +MzAwMTAxMDAwMDAwWjAZMRcwFQYDVQQDDA5VUkktZW1wdHkgdGVzdDCCASIwDQYJ
    +KoZIhvcNAQEBBQADggEPADCCAQoCggEBAKEuJi9Gny9OfQScZEG1R9Gy5pqbM7it
    +pGda6gm4PXuFQisMapdg0DwO3odY1grTQE6gFEjSCYtEoGyuJMSUNdILvc7sfCWa
    +QkuXCnkx7nXgyiHLNuhgkhw6kDXgRMzdaI/B7IlZkZYnfyXWi6A6lQ6dLJRU1p0o
    +C+JawKngvmOAAKvhaC1keEbfUh//8UhK/YkjJShV1c0ijFlucj4eYDQyf9x9lYw7
    +oukjnVFKmhqiRO/SxwhYjYbyTppVRzC4sCJz0KRn4qwnGV5x2+jDqUvFUxJc5W7f
    +N+utrfNWeszmP5Elw+ezIsq+3D9ss+nHmtXIDxVNA3dp8tZQKzQ4WzcCAwEAATAN
    +BgkqhkiG9w0BAQsFAAOCAQEART2PW/rXPU5d+NTJnP2mdIi5Ft01gpaRgY1iBsFm
    ++D6zXT/k9wr56GEDLWUf2qOJeXsNc+f9FKI0BCVb/5vVoB60AAMHKbb+NxwoXLHi
    +dT6DaEPK1VGdEBnpL5uOII3pO42FMPewBUNuoUmb9zipyPoL6zbc7khRcBBIYMlr
    +05Y2tqJqECNAtGQ9+v5CBcECP3QI4L0UmCJMwpj7XH5TrfKfLPZuUEvQaET63dXb
    +ioi+P6KEpuxblOL0Uj2e2erhJYavqCnoxt+0eUDDBsrwuk7/sRtbBO0XjkgEtJZ8
    +n3OS74cjqIwTx+PqObGThECnyBYwONY7RWU5G4r6kqMXBg==
    +-----END CERTIFICATE-----
    
  • authentik/sources/saml/tests/test_response.py+114 2 modified
    @@ -196,10 +196,122 @@ def test_verification_assertion_duplicate(self):
             self.assertNotEqual(parser._get_name_id()[1], "bad")
             self.assertEqual(parser._get_name_id()[1], "_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7")
     
    -    @freeze_time("2022-10-14T14:15:00")
    +    @freeze_time("2014-07-17T01:02:18Z")
    +    def test_verification_assertion_xsw_nested_duplicate_id(self):
    +        """Nested-duplicate-ID XSW: a forged outer Assertion shares its ID with a
    +        nested copy of the original signed Assertion (placed inside <saml:Advice>),
    +        so the Signature's Reference URI (#ORIG_ID) matches the outer Assertion's
    +        ID *and* dereferences to legitimately-signed content. Must be rejected."""
    +        key = load_fixture("fixtures/signature_cert.pem")
    +        kp = CertificateKeyPair.objects.create(
    +            name=generate_id(),
    +            certificate_data=key,
    +        )
    +        self.source.verification_kp = kp
    +        self.source.signed_assertion = True
    +        self.source.signed_response = False
    +        request = self.factory.post(
    +            "/",
    +            data={
    +                "SAMLResponse": b64encode(
    +                    load_fixture("fixtures/response_signed_assertion_xsw_nested.xml").encode()
    +                ).decode()
    +            },
    +        )
    +
    +        parser = ResponseProcessor(self.source, request)
    +        with self.assertRaises(InvalidSignature):
    +            parser.parse()
    +
    +    @freeze_time("2014-07-17T01:02:18Z")
    +    def test_verification_response_uri_empty(self):
    +        """Some real-world IdPs (notably some Okta dev-tenant configurations
    +        observed in the gosaml2 testdata corpus at saml.oktadev.com) sign the
    +        Response with ds:Reference URI="" instead of URI="#<ID>". Per xmldsig
    +        §4.4.3.2, URI="" covers the entire enclosing document via the
    +        enveloped-signature transform — strictly more attested content than
    +        "#<ID>" — so consuming the target is a subset of what was signed."""
    +        key = load_fixture("fixtures/signature_cert_uri_empty.pem")
    +        kp = CertificateKeyPair.objects.create(
    +            name=generate_id(),
    +            certificate_data=key,
    +        )
    +        self.source.verification_kp = kp
    +        self.source.signed_response = True
    +        self.source.signed_assertion = False
    +        request = self.factory.post(
    +            "/",
    +            data={
    +                "SAMLResponse": b64encode(
    +                    load_fixture("fixtures/response_signed_response_uri_empty.xml").encode()
    +                ).decode()
    +            },
    +        )
    +
    +        parser = ResponseProcessor(self.source, request)
    +        parser.parse()
    +
    +    @freeze_time("2014-07-17T01:02:18Z")
    +    def test_verification_assertion_uri_empty(self):
    +        """Symmetric to test_verification_response_uri_empty but for an
    +        Assertion-level signature: the same xmldsig "this document" semantics
    +        still cover the whole enclosing document, so the Assertion we then
    +        consume is part of the attested content. We have no real-world IdP
    +        samples emitting this configuration, but the pre-fix code accepted it
    +        and the cryptographic guarantee holds, so keep accepting it rather
    +        than risk breaking an IdP we haven't sampled."""
    +        key = load_fixture("fixtures/signature_cert_assertion_uri_empty.pem")
    +        kp = CertificateKeyPair.objects.create(
    +            name=generate_id(),
    +            certificate_data=key,
    +        )
    +        self.source.verification_kp = kp
    +        self.source.signed_assertion = True
    +        self.source.signed_response = False
    +        request = self.factory.post(
    +            "/",
    +            data={
    +                "SAMLResponse": b64encode(
    +                    load_fixture("fixtures/response_signed_assertion_uri_empty.xml").encode()
    +                ).decode()
    +            },
    +        )
    +
    +        parser = ResponseProcessor(self.source, request)
    +        parser.parse()
    +
    +    @freeze_time("2014-07-17T01:02:18Z")
    +    def test_verification_assertion_xsw3(self):
    +        """XSW-3 (signature relocation): a forged Assertion contains a Signature whose
    +        ds:Reference URI points to a second Assertion in the document. The signature
    +        verifies (because the digest matches the legitimate referenced Assertion),
    +        but the verifier must NOT then consume the forged Assertion as if it were
    +        signed."""
    +        key = load_fixture("fixtures/signature_cert.pem")
    +        kp = CertificateKeyPair.objects.create(
    +            name=generate_id(),
    +            certificate_data=key,
    +        )
    +        self.source.verification_kp = kp
    +        self.source.signed_assertion = True
    +        self.source.signed_response = False
    +        request = self.factory.post(
    +            "/",
    +            data={
    +                "SAMLResponse": b64encode(
    +                    load_fixture("fixtures/response_signed_assertion_xsw3.xml").encode()
    +                ).decode()
    +            },
    +        )
    +
    +        parser = ResponseProcessor(self.source, request)
    +        with self.assertRaises(InvalidSignature):
    +            parser.parse()
    +
    +    @freeze_time("2014-07-17T01:02:18Z")
         def test_name_id_comment(self):
             """Test comment in name ID"""
    -        fixture = load_fixture("fixtures/response_signed_assertion_dup.xml")
    +        fixture = load_fixture("fixtures/response_signed_assertion.xml")
             fixture = fixture.replace(
                 "_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7",
                 "_ce3d2948b4cf20146dee0a0b3dd6f<!--x-->69b6cf86f62d7",
    
  • locale/en/dictionaries/software-terms.txt+2 0 modified
    @@ -93,6 +93,7 @@ frie
     gcsp
     geoip
     glpi
    +gosaml
     grecaptcha
     guac
     guacd
    @@ -113,6 +114,7 @@ microsoft
     mmdb
     noopener
     noreferrer
    +oktadev
     openidc
     ouia
     ouid
    
  • website/docs/security/cves/CVE-2026-47201.md+31 0 added
    @@ -0,0 +1,31 @@
    +# CVE-2026-47201
    +
    +## XML Signature Wrapping in SAML Source ACS allows authentication as arbitrary federated user
    +
    +### Summary
    +
    +authentik's SAML Source ACS endpoint is vulnerable to XML Signature Wrapping when validating upstream SAML responses. An attacker with any account at the upstream IdP can reuse a valid signed assertion to authenticate as another federated user.
    +
    +### Patches
    +
    +authentik 2026.5.1, 2026.2.4 and 2025.12.6 fix this issue.
    +
    +### Impact
    +
    +Affected: authentik deployments using a SAML Source for upstream SAML federation with signed assertions, or signed responses without signed assertions. Not affected: deployments that do not use SAML Source for upstream SAML federation.
    +
    +The SAML Source trusts that the verified XML signature belongs to the assertion or response that authentik later consumes. A crafted SAML response can make signature verification succeed against the attacker's original signed assertion while authentik reads identity data from a different forged assertion.
    +
    +An attacker first completes a legitimate login to the upstream IdP and captures the signed SAML response sent through their browser. They then submit a modified response to the ACS endpoint where the valid signature still verifies, but the consumed assertion contains a victim identifier or attacker-chosen attributes.
    +
    +The attacker can authenticate as a victim who has previously used the SAML Source, or as a local user matched by forged email or username when those matching modes are enabled.
    +
    +### Workarounds
    +
    +Disable affected SAML Sources, or block access to their ACS endpoints.
    +
    +### For more information
    +
    +If you have any questions or comments about this advisory:
    +
    +- Email us at [security@goauthentik.io](mailto:security@goauthentik.io)
    

Vulnerability mechanics

Root cause

"The SAML Source's ResponseProcessor trusts that the verified XML signature belongs to the assertion it later consumes, without verifying that the consumed assertion is the same element that was signed."

Attack vector

An attacker with any valid account at the upstream IdP first completes a legitimate login and captures the signed SAML response. They then craft a modified SAML response containing a forged assertion with a victim's identifier or attacker-chosen attributes, while keeping the original signed assertion elsewhere in the document (e.g., inside `<saml:Advice>` or as a sibling element). The XML signature verification succeeds against the original signed assertion, but authentik's `ResponseProcessor` consumes the forged assertion instead, allowing the attacker to authenticate as any federated user [CWE-287] [ref_id=1].

Affected code

The vulnerability is in authentik's SAML Source ACS endpoint, specifically in the `ResponseProcessor` class within `authentik/sources/saml/`. The patch adds tests for XML Signature Wrapping (XSW) variants in `test_response.py` and includes new test fixtures (`response_signed_assertion_xsw3.xml`, `response_signed_assertion_xsw_nested.xml`, `response_signed_response_uri_empty.xml`, `response_signed_assertion_uri_empty.xml`) [patch_id=3107396].

What the fix does

The patch adds test cases that verify the `ResponseProcessor` rejects XML Signature Wrapping attacks. The tests cover three XSW variants: (1) a forged outer Assertion sharing its ID with a nested copy of the original signed Assertion placed inside `<saml:Advice>` (nested-duplicate-ID XSW), (2) signature relocation where a forged Assertion's `ds:Reference URI` points to a legitimate second Assertion (XSW-3), and (3) acceptance of `URI=""` references which legitimately cover the entire document per xmldsig §4.4.3.2. The fix ensures that after signature verification, the processor only consumes the assertion that was actually signed, not a different assertion that happens to be in the same document [patch_id=3107396].

Preconditions

  • authThe attacker must have a valid account at the upstream SAML IdP used by the authentik SAML Source.
  • configThe authentik deployment must use a SAML Source configured with signed assertions or signed responses (without signed assertions).
  • networkThe attacker must be able to intercept or capture the signed SAML response sent to their browser after a legitimate login.
  • inputThe attacker must craft a modified SAML response with a forged assertion and submit it to the ACS endpoint.

Generated on May 29, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

3

News mentions

0

No linked articles in our index yet.