/

CVE-2026-54781

Severity:

HIGH RISK

(7.4)

SAML Token Validation Flaw (CWE-287) in CoreWCF

CVE-2026-54781

Deferred

Vulnerability type

Category:

Authentication and Token Validation Weakness

CWE:

CWE-287, CWE-345

Impact:

Authentication Bypass and Unauthorized Access

Severity:

HIGH RISK

(7.4)

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

CoreWCF's SAML token validation previously failed to enforce SubjectConfirmation method URIs and holder-of-key proof keys, weakening its authentication guarantees.

Under these conditions, a subject could be authenticated without proving control of the referenced key or assertion, enabling holder-of-key downgrades and unauthorized access in SAML-secured services.

Affected context

This vulnerability affects applications using CoreWCF with SAML-based authentication and relying on SamlSecurityTokenHandler for token validation.

It is relevant in environments where services accept SAML assertions for client or user identity and expect strict enforcement of SubjectConfirmation methods (such as holder-of-key) and associated proof keys.

The risk materializes when SAML tokens can be introduced or manipulated by parties who can craft assertions with custom or weakened confirmation methods that are still accepted as valid by the service.

Exploit preconditions

  • Attack surface: SAML-secured CoreWCF service endpoints that validate tokens via SamlSecurityTokenHandler.
  • Required access: Ability to submit or influence SAML tokens presented to the service (e.g., via a federated identity provider, token issuance flow, or upstream integration).
  • Trigger point: Token validation stage where SubjectConfirmation elements are evaluated, but confirmation method URIs and holder-of-key proof keys are not strictly enforced.
  • Why exploitation is possible: The validator accepts assertions as authenticated subjects even when the SubjectConfirmation method is downgraded or uses custom methods, and does not require proof of possession for holder-of-key scenarios, undermining the intended trust model.

Why this happens

The core issue lies in incomplete enforcement of SAML SubjectConfirmation semantics during token validation.

In a secure holder-of-key design, a token's subject must demonstrate possession of the key referenced in the assertion; however, SamlSecurityTokenHandler in the affected CoreWCF versions allowed tokens to be treated as authenticated without verifying that proof-of-possession.

Likewise, it did not strictly validate the SubjectConfirmation method URIs, permitting custom or downgraded methods that bypass expected checks.

This maps to CWE-287: Improper Authentication and CWE-345: Insufficient Verification of Data Authenticity, where identity claims are accepted without enforcing the necessary cryptographic or semantic guarantees.

Potential impact

  • An attacker may authenticate as a legitimate subject without proving control of the corresponding key material.
  • Services could grant unauthorized access to operations or data protected by SAML-based authentication.
  • Existing authorization policies may be undermined due to incorrectly trusted SAML assertions.
  • Attackers could pivot within a distributed system by presenting crafted tokens to multiple SAML-relying services.

General mitigation guidance

Mitigation focuses on strengthening token validation logic and enforcing SAML confirmation semantics consistently across services.

Recommended patterns include:

  • Ensuring that SubjectConfirmation method URIs are strictly validated against an allowlist of supported and secure methods (e.g., holder-of-key, bearer where appropriate).
  • Requiring proof-of-possession for holder-of-key tokens by binding the assertion to a cryptographic key and verifying that the client demonstrates control of that key during the protocol exchange.
  • Treating custom or unexpected SubjectConfirmation methods as invalid and rejecting the associated assertions.
  • Implementing centralized authentication policies that codify how SAML tokens must be validated, including confirmation rules and cryptographic requirements, and applying those policies consistently to all CoreWCF endpoints.
  • Designing services with least-privilege authorization so that even if a token is improperly accepted, the blast radius of any unauthorized identity is minimized.

How teams detect issues like this

Detection typically relies on reviewing both configuration and code paths that handle SAML token validation.

Useful strategies include:

  • Static analysis rules or manual code review to identify usages of SamlSecurityTokenHandler and confirm that SubjectConfirmation methods and proof keys are explicitly validated.
  • Security-focused review of authentication middleware and CoreWCF service configuration to ensure that holder-of-key semantics are enforced and that only approved SubjectConfirmation methods are accepted.
  • Audit logging of SAML authentication events, including the SubjectConfirmation method and key identifiers, followed by anomaly detection for unexpected or custom methods.
  • Policy enforcement in CI/CD pipelines that flag changes to token validation logic, requiring security sign-off when SAML handling components are modified.

Sources

SourceLink
github.comgithub.com/CoreWCF/CoreWCF/commit/6a99df3242f54acd6f89edfd6050430b72d0c685
github.comgithub.com/CoreWCF/CoreWCF/commit/86dd3232b6b8aaf32281be9e8d798afad6145d58
github.comgithub.com/CoreWCF/CoreWCF/commit/9eb9b46d1c2af06fb71f656a02f4d5b4649c1f03
github.comgithub.com/CoreWCF/CoreWCF/releases/tag/v1.8.1
github.comgithub.com/CoreWCF/CoreWCF/releases/tag/v1.9.1
github.comgithub.com/CoreWCF/CoreWCF/security/advisories/GHSA-48pq-2xq3-c2m4

Frequently asked

questions

Exploitability depends on how SAML tokens are issued and who can influence them. Environments with federated identity providers, custom token issuers, or complex trust relationships are more exposed if they assume holder-of-key enforcement that is not actually performed.

An attacker must be able to present or manipulate SAML tokens accepted by the CoreWCF service—typically through control of or interaction with a token issuer, or by compromising a component in the authentication flow that constructs assertions.

The safest pattern is to enforce strict SAML SubjectConfirmation rules: validate method URIs against a secure allowlist, require proof-of-possession for holder-of-key tokens, and reject tokens that do not meet these criteria. Centralizing these checks in a shared authentication component helps ensure consistency.

Prevention involves establishing clear security requirements for token validation, encoding them in reusable libraries or middleware, and enforcing them via policy and automated checks. Regularly reviewing authentication code, integrating static analysis focused on identity and crypto usage, and maintaining robust test cases for SAML scenarios all help avoid future validation gaps.

Find out what's already
exploitable in your codebase.