Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-41694

CVE-2026-41694: Spring Security SAML Oracle Vulnerability

CVE-2026-41694 is an information disclosure vulnerability in Spring Security SAML that allows attackers to use the Service Provider as a decryption oracle. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-41694 Overview

CVE-2026-41694 affects Spring Security SAML implementations across multiple supported branches. The library decrypts SAML Responses and elements within LogoutRequests and LogoutResponses without first validating signatures. Attackers can craft malicious SAML payloads and use the Service Provider as a decryption oracle. The flaw is categorized under CWE-347: Improper Verification of Cryptographic Signature.

Critical Impact

Adversaries with network access can iteratively submit crafted SAML payloads to recover plaintext from encrypted assertion elements without authentication.

Affected Products

  • Spring Security 5.7.0 through 5.7.23 and 5.8.0 through 5.8.25
  • Spring Security 6.3.0 through 6.3.16, 6.4.0 through 6.4.16, and 6.5.0 through 6.5.10
  • Spring Security 7.0.0 through 7.0.5

Discovery Timeline

  • 2026-06-10 - CVE-2026-41694 published to NVD
  • 2026-06-10 - Last updated in NVD database

Technical Details for CVE-2026-41694

Vulnerability Analysis

Spring Security SAML acts as a Service Provider (SP) that consumes assertions issued by an Identity Provider (IdP). Standard SAML profiles require Service Providers to validate XML signatures on incoming SAML messages before processing encrypted elements. This vulnerability arises because Spring Security performs decryption operations on SAML Response, LogoutRequest, and LogoutResponse payloads before enforcing signature validation.

Attackers exploit this gap by submitting forged SAML messages containing chosen ciphertext blocks. The Service Provider attempts decryption and exposes observable side effects through error responses, timing variations, or behavior changes. These observable differences turn the SP into a decryption oracle, enabling recovery of plaintext from captured encrypted SAML data over many requests.

Root Cause

The root cause is improper ordering of cryptographic operations within the SAML message processing pipeline. The library treats decryption as a precondition for further parsing rather than gating it behind signature verification. This violates the principle that unauthenticated ciphertext should never be processed, a defense against adaptive chosen-ciphertext attacks on XML Encryption.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker submits a crafted SAML message to the SP's Assertion Consumer Service or Single Logout endpoint. By repeatedly modifying ciphertext segments and observing SP responses, the attacker reconstructs plaintext bit-by-bit. Attack complexity is high because exploitation requires many requests and detailed analysis of SP behavior under varied inputs.

No verified public proof-of-concept code is available. See the Spring Security Advisory for vendor-supplied technical details.

Detection Methods for CVE-2026-41694

Indicators of Compromise

  • High volumes of inbound SAML messages from a single source targeting /saml/SSO, /saml/logout, or similar Assertion Consumer Service endpoints
  • SAML payloads containing malformed or repeatedly mutated EncryptedAssertion or EncryptedID elements
  • Repeated SAML processing errors logged by the Spring Security filter chain without matching IdP-issued signatures

Detection Strategies

  • Inspect application logs for spikes in Saml2AuthenticationException and decryption-related stack traces from OpenSaml4AuthenticationProvider or equivalent classes
  • Deploy WAF rules that fingerprint repeated SAML POSTs with varying ciphertext blocks but identical message envelopes
  • Correlate authentication failures with absent or invalid ds:Signature elements on incoming SAML messages

Monitoring Recommendations

  • Forward SAML endpoint access logs and Spring Security audit events to a centralized analytics platform for behavioral baselining
  • Alert on any single client IP issuing more than a threshold of SAML requests per minute to SP endpoints
  • Monitor cipher operation latency and error rates as oracle attacks generate distinctive statistical signatures

How to Mitigate CVE-2026-41694

Immediate Actions Required

  • Upgrade Spring Security to a fixed release within the 5.7.x, 5.8.x, 6.3.x, 6.4.x, 6.5.x, or 7.0.x branch as published in the Spring Security Advisory
  • Enforce mandatory signature validation on all inbound SAML Responses, LogoutRequests, and LogoutResponses at the SP configuration layer
  • Audit SP metadata to ensure WantAssertionsSigned and AuthnRequestsSigned are set to true

Patch Information

The Spring Security project has published fixed versions for each affected branch. Consult the Spring Security Advisory for the exact patched version numbers corresponding to your branch and apply the upgrade through your build tooling (pom.xml or build.gradle).

Workarounds

  • Restrict SAML endpoints to trusted network paths using upstream reverse proxy ACLs until patching is complete
  • Configure the SP to reject any SAML message lacking a valid ds:Signature element prior to invoking decryption logic
  • Rate-limit requests to Assertion Consumer Service and Single Logout endpoints to slow oracle-style probing
bash
# Maven dependency upgrade example - replace VERSION with patched release from advisory
# <dependency>
#   <groupId>org.springframework.security</groupId>
#   <artifactId>spring-security-saml2-service-provider</artifactId>
#   <version>VERSION</version>
# </dependency>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.