/

CVE-2026-49283

Severity:

HIGH RISK

(8.7)

Improper Certificate Validation (CWE-295) in SimpleSAMLphp

CVE-2026-49283

Deferred

Vulnerability type

Category:

Improper Certificate Validation

CWE:

CWE-295

Impact:

Authentication Bypass and Identity Provider Impersonation

Severity:

HIGH RISK

(8.7)

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 certificate-validation and identity-binding flaw in the SimpleSAMLphp SAML2 library can cause an unsigned embedded SAML Response to be accepted for the wrong identity provider. In a multi-IdP federation, a lower-trust or malicious IdP may authenticate users as a higher-trust victim IdP with attacker-controlled identity and session attributes.

Affected context

The issue occurs in deployments using the HTTPArtifact::receive() flow and SOAP-based artifact resolution across multiple identity providers. Risk is higher when embedded SAML responses are unsigned or insufficiently bound to the artifact issuer, and when TLS validation results are applied using metadata selected from the embedded response rather than being strictly associated with the originating IdP.

Exploit preconditions

  • Attack surface: SAML HTTP Artifact processing and SOAP artifact resolution
  • Required access: Ability to operate or influence an identity provider participating in the federation
  • Trigger point: Validation of an embedded SAML Response within an ArtifactResponse
  • Why exploitation is possible: The response may be checked against the wrong identity-provider metadata, while a validator that does not raise an exception is treated as successful

Why this happens

The underlying flaw is improper certificate validation combined with incorrect binding between the outer artifact message and the embedded SAML response. The TLS validator is attached to the outer SOAP message, but validation of the embedded response can be evaluated using metadata selected from its claimed issuer. Additionally, a validation routine that returns normally when a key does not match is interpreted as successful by the message-validation logic. This maps to CWE-295: Improper Certificate Validation, where certificate or key checks do not reliably establish the identity and trust relationship being asserted.

Potential impact

  • An attacker could authenticate as users belonging to a higher-trust identity provider
  • Federated applications may accept attacker-selected assertion attributes or NameID values
  • Unauthorized sessions could be created with manipulated session data
  • Trust relationships between identity providers could be bypassed
  • Downstream applications could make authorization decisions using forged identity information

General mitigation guidance

Mitigation generally focuses on enforcing explicit identity binding and fail-closed certificate validation throughout the artifact-processing flow.

Common defensive patterns include:

  • Bind the embedded SAML Response to the identity provider that issued the artifact
  • Validate signatures and certificates against the expected issuer and its trusted metadata
  • Treat certificate or key mismatches as validation failures rather than successful returns
  • Require signed responses or assertions according to federation policy
  • Avoid selecting trust metadata solely from untrusted issuer claims
  • Apply least privilege to federated identities and downstream session permissions
  • Use narrowly scoped trust relationships and separate high-trust providers from lower-trust participants

How teams detect issues like this

Organizations can identify similar weaknesses through:

  • Static analysis of certificate-validation routines for inverted, ignored, or non-failing mismatch conditions
  • Code review of relationships between outer protocol messages, embedded assertions, and issuer metadata
  • Tests covering mismatched artifact issuers, embedded response issuers, certificates, and signing keys
  • Federation policies requiring explicit issuer-to-artifact binding and signed SAML content
  • Runtime monitoring for authentication events where the artifact source and assertion issuer differ
  • Automated security review tools that flag fail-open validation logic and trust decisions based solely on attacker-controlled claims

Sources

SourceLink
github.comgithub.com/simplesamlphp/saml2/commit/4a71b20d8d845579fd0a54d6449c265b40db459d
github.comgithub.com/simplesamlphp/saml2/commit/a2c1ac588c70d7b7998546cf32675fb113f22a5f
github.comgithub.com/simplesamlphp/saml2/commit/d5c213132ef671c0018a11252322034dbddd735a
github.comgithub.com/simplesamlphp/saml2/commit/e2df7992609964951b2a3e7d6566b7427b2a968f
github.comgithub.com/simplesamlphp/saml2/security/advisories/GHSA-6929-8p9f-26jx

Frequently asked

questions

Yes, in a federation where an attacker-controlled or lower-trust identity provider can participate in SAML artifact exchanges, exploitation may occur through crafted protocol messages without local access to the service.

No. The attacker may only need control of, or an accepted role within, another participating identity provider. The vulnerable flow can then cause downstream services to trust attacker-selected identity data.

Ensure that every embedded SAML response is cryptographically and logically bound to the identity provider that issued the artifact, and make all certificate or key mismatches fail validation.

Use fail-closed validation, require appropriate SAML signatures, verify issuer and artifact relationships against trusted metadata, and test federation logic with conflicting issuers and certificates.

Find out what's already
exploitable in your codebase.