/

CVE-2026-25922

Severity:

HIGH RISK

(8.8)

Authentication and Signature Validation Weakness

CVE-2026-25922

Analyzed

Vulnerability type

Category:

Authentication and Signature Validation Weakness

CWE:

CWE-287, CWE-347

Impact:

Authentication Bypass / Account Impersonation

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A flaw in authentik's SAML Source validation logic allows a malicious, unsigned SAML assertion to be accepted when only assertion signatures are verified and encryption is not fully configured.

Under specific SAML verification settings, an attacker who can influence or inject SAML responses may cause authentik to consume their injected assertion instead of the legitimate signed one, leading to unauthorized authentication.

Affected context

This vulnerability affects authentik deployments configured with SAML Sources that:

  • Have Verify Assertion Signature enabled under Verification Certificate, and
  • Do not have Verify Response Signature enabled, or
  • Lack a configured Encryption Certificate under Advanced Protocol settings.

In these configurations, authentik may process an attacker-controlled SAML assertion that precedes the legitimate signed assertion in the SAML response, using the malicious one for authentication decisions instead of the trusted, signed assertion.

Exploit preconditions

  • Attack surface: SAML-based single sign-on (SSO) endpoints exposed by authentik as an identity provider or consumer.
  • Required access: Ability to inject, modify, or influence SAML responses in transit or operate a malicious/compromised SAML identity provider.
  • Trigger point: Delivery of a crafted SAML response containing a malicious assertion before the valid signed assertion to authentik's SAML endpoint.
  • Why exploitation is possible: The validation logic may treat the presence of a valid signature on one assertion as sufficient, then select the first acceptable assertion in the response rather than strictly binding the signature to the specific assertion actually consumed.

Why this happens

The core issue is an incomplete and misaligned application of SAML signature validation, mapping to:

  • CWE-347: Improper Verification of Cryptographic Signature
  • CWE-287: Improper Authentication

Instead of tightly coupling signature verification to the exact assertion that will be used for authentication, the SAML processing flow allows a malicious assertion to be injected earlier in the response. Because the configuration may only validate assertion signatures (but not the overall response) and may not enforce encryption, the selection logic can end up using an unsigned or improperly validated assertion. This breaks the trust boundary between the SAML identity provider and authentik, ultimately enabling authentication decisions based on untrusted data.

Potential impact

  • Unauthorized login as arbitrary users, including high-privilege or administrative accounts
  • Bypass of multifactor or other upstream identity verification mechanisms enforced by the SAML IdP
  • Cross-tenant or cross-application access if authentik is a central identity provider
  • Lateral movement into connected applications and services that trust authentik's assertions
  • Compliance violations due to incorrect attribution of user actions or access records

General mitigation guidance

Effective mitigation focuses on hardening SAML validation and reducing trust in partially checked messages:

  • Prefer configurations that verify both response and assertion signatures, ensuring the specific assertion used for authentication is explicitly covered by a trusted signature.
  • Treat unencrypted or partially encrypted SAML assertions as untrusted, and avoid mixing encrypted and unencrypted content in ways that complicate validation.
  • Enforce strict binding between the subject assertion and the cryptographic checks applied: validate that the assertion actually used for authentication is the one that passed signature verification.
  • Apply a fail-closed policy for SAML validation: reject responses with multiple assertions or unexpected assertion ordering unless explicitly handled by strict, secure logic.
  • Limit the number and diversity of SAML configurations, and prefer well-reviewed, secure-by-default SAML profiles and templates.
  • Use least-privilege account mappings so that even if an assertion is mishandled, the default granted access is minimal.

How teams detect issues like this

Organizations can look for this class of issue by focusing on protocol validation behavior:

  • Static analysis / configuration review:
  • Search for SAML configurations that verify only assertion signatures but not response signatures.
  • Flag SAML integrations that leave encryption certificates unconfigured while still consuming sensitive assertions.
  • Identify code paths that select from multiple SAML assertions within a response without tightly binding selection to signature checks.
  • Code review signals:
  • Authentication logic that processes the "first assertion" or iterates over assertions without signature-aware filtering.
  • Conditional logic that treats signature validation as a separate step from assertion selection.
  • Runtime monitoring:
  • Log and review SAML responses containing multiple assertions or unusual assertion ordering.
  • Correlate authentication events with SAML validation outcomes, alerting on any successful login where validation logs are missing or inconsistent.
  • Automated security testing tools with SAML support can attempt multi-assertion injection scenarios and signature-stripping tests to validate correct behavior.

Sources

SourceLink
github.comgithub.com/goauthentik/authentik/releases/tag/version%2F2025.10.4
github.comgithub.com/goauthentik/authentik/releases/tag/version%2F2025.12.4
github.comgithub.com/goauthentik/authentik/releases/tag/version%2F2025.8.6
github.comgithub.com/goauthentik/authentik/security/advisories/GHSA-jh35-c4cc-wjm4

Frequently asked

questions

Yes, if authentik's SAML endpoints are exposed and an attacker can send or influence SAML responses (for example, by controlling a SAML IdP or performing a man-in-the-middle attack), they can attempt to exploit this issue remotely under the affected configurations.

Not necessarily. The attacker primarily needs the ability to inject or craft SAML responses that authentik will accept. This can be achieved by operating a malicious IdP, compromising a legitimate IdP, or interfering with the SAML exchange. Valid user credentials are not required if the attacker can forge acceptable assertions.

Ensure that SAML processing strictly validates cryptographic signatures on the exact assertion used for authentication and, where applicable, the overall response. Enable both response and assertion signature verification, enforce correct key usage, and reject any responses containing multiple or unexpected assertions that are not fully validated.

Adopt a security-by-design approach for SAML: require strong, bound signature checks; prefer encrypted and signed responses; standardize on secure configuration templates; and include SAML protocol validation scenarios in your security testing and code review processes. Regularly audit SSO configurations and treat changes to SAML and other federation settings as high-risk, requiring security review.

Find out what's already
exploitable in your codebase.