You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_Reported by [@kodareef5](https://github.com/kodareef5), [@Android-Login-Analysis](https://github.com/Android-Login-Analysis), and [@AyushParkara](https://github.com/AyushParkara)_
4
+
5
+
## SAML Source Fails to Validate Assertion Conditions
6
+
7
+
### Summary
8
+
9
+
Due to how authentik used to extract the NameID value from a SAML assertion, it was possible for an attacker to trick authentik into only seeing a part of the NameID value, potentially allowing an attacker to get access to other accounts.
10
+
11
+
### Patches
12
+
13
+
authentik 2025.12.5 and 2026.2.3 fix this issue, for other versions the workaround below can be used.
14
+
15
+
### Impact
16
+
17
+
This issue can be exploited given an authentik instance with a SAML Source, where the attacker has an account on the SAML Source and the ability to modify their NameID value (commonly username or E-mail), and XML Signing is enabled. The attacker can modify the SAML assertion given to authentik by injecting a comment within the NameID value, which effectively truncates the NameID value to the snippet before the comment, and give the attack access to any user account.
18
+
19
+
### Workarounds
20
+
21
+
Create a SAML Source property mapping with the following expression and add it to all SAML Sources:
22
+
23
+
```python
24
+
if name_id.text !="".join(name_id.itertext()):
25
+
raiseValueError("Mismatched NameID")
26
+
return {}
27
+
```
28
+
29
+
### For more information
30
+
31
+
If you have any questions or comments about this advisory:
32
+
33
+
- Email us at [security@goauthentik.io](mailto:security@goauthentik.io).
0 commit comments