HIGH 8.2

CVE-2026-40994: Spring Web Services WS-Security BSP Bypass

Spring Web Services contains a configuration flaw in its WS-Security interceptor that disables Basic Security Profile (BSP) compliance checks on incoming SOAP messages. This allows requests that violate WS-Security protocol rules to be accepted and processed, bypassing integrity and authenticity validations that should be enforced at the protocol layer. An unauthenticated attacker on the network can craft malformed WS-Security headers to bypass message validation controls.

Source data · NVD / CISA · public domain

CVSS
3.1 · 8.2 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N
Weaknesses (CWE)
CWE-1188
Affected products
0 configuration(s)
Published / Modified
2026-06-11 / 2026-06-23

NVD description (verbatim)

Wss4jSecurityInterceptor initialized its BSP (WS-I Basic Security Profile) compliance flag so that inbound validation disabled WSS4J BSP enforcement on RequestData. Services that validate WS-Security on the network could therefore accept messages that violate BSP rules, weakening protocol-level checks. Affected versions: Spring Web Services 5.0.0 through 5.0.1; 4.1.0 through 4.1.3; 4.0.0 through 4.0.18; 3.1.0 through 3.1.8.

1 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The Wss4jSecurityInterceptor in affected Spring Web Services versions fails to properly initialize the BSP compliance flag when processing inbound requests. This causes the RequestData object to have BSP enforcement disabled during message validation. WS-I Basic Security Profile defines strict rules for WS-Security header construction, canonicalization, and timestamp handling. When BSP enforcement is disabled, messages violating these rules are accepted without error, allowing potential signature spoofing, timestamp tampering, or malformed credential structures to pass validation. The vulnerability affects multiple active maintenance branches across several years of releases.

Business impact

Organizations running Spring Web Services as a SOAP endpoint face the risk of accepting fraudulent or tampered WS-Security messages that should have been rejected. This undermines message authenticity and non-repudiation guarantees, particularly critical in B2B integrations, financial services, and regulated environments where WS-Security is deployed specifically to enforce protocol-level trust. An attacker could modify messages in transit, impersonate legitimate services, or bypass credential validation, leading to unauthorized data access or transaction manipulation.

Affected systems

Spring Web Services versions 3.1.0–3.1.8, 4.0.0–4.0.18, 4.1.0–4.1.3, and 5.0.0–5.0.1 are affected. Organizations should identify instances where Wss4jSecurityInterceptor is used to validate inbound WS-Security messages. This vulnerability does not affect Spring Web Services versions prior to 3.1.0, but verify your exact version before assuming safety.

Exploitability

The vulnerability requires network access to the SOAP endpoint but no authentication or user interaction. The attacker simply constructs a WS-Security message that violates BSP rules (such as missing required headers, improper signatures, or expired timestamps) and sends it to the vulnerable service. Because BSP enforcement is disabled, the message is processed as if it were valid. This is a straightforward network-based attack with low complexity; no special credentials or interaction with legitimate users is needed. Active exploitation is feasible.

Remediation

Update Spring Web Services to a patched version that properly initializes BSP compliance. Verify the specific patch version with the Spring projects advisory, as each branch (3.1.x, 4.0.x, 4.1.x, 5.0.x) has its own patch release. Until patching is possible, apply strict network segmentation to limit access to SOAP endpoints and consider implementing additional WS-Security validation logic at the application or gateway layer. Review logs for anomalous WS-Security message patterns or rejections prior to the fix.

Patch guidance

Contact Spring projects via their security advisory channels to identify the specific patched version for your branch. Each maintenance line (3.1, 4.0, 4.1, 5.0) will have a minimum patched version that re-enables BSP enforcement in Wss4jSecurityInterceptor. Test patches in a non-production environment to confirm BSP validation is restored and that legitimate clients continue to function. Coordinate with teams managing downstream SOAP consumers to ensure they send properly formed WS-Security messages.

Detection guidance

Enable debug-level logging for Spring Web Services security processing to observe the RequestData BSP flag state. Monitor for WS-Security validation exceptions or unusual message rejection patterns before and after patching. Search for Wss4jSecurityInterceptor bean configurations in your Spring context to confirm which endpoints are affected. Review WS-Security headers in transit (via proxy logs or packet captures) for structural violations (missing timestamps, incorrect signature algorithms, expired credentials) that should have been rejected. Baseline these metrics to detect when BSP enforcement is restored.

Why prioritize this

This vulnerability has a CVSS 3.1 score of 8.2 (HIGH) due to low attack complexity, no authentication requirement, and network accessibility combined with meaningful integrity impact. While not actively exploited in the wild per KEV data, the ease of exploitation and direct weakening of cryptographic controls in WS-Security make it a priority for any organization relying on SOAP endpoints for sensitive integrations. Patch promptly, particularly for production B2B or financial services systems.

Risk score, explained

The score reflects three key factors: (1) ease of attack—any network user can send a malformed WS-Security message without credentials; (2) protocol-level impact—BSP bypass weakens message integrity and authenticity assurances that are the core reason WS-Security is deployed; (3) scope—the vulnerability affects multiple stable versions across three years of releases, increasing the population of affected deployments. The availability impact is rated as none because validation bypass does not cause service unavailability, only integrity compromise.

Frequently asked questions

Does this vulnerability allow an attacker to read encrypted SOAP messages?

No. The vulnerability does not decrypt messages or break encryption. It bypasses validation that checks if WS-Security headers themselves are properly formed and signed. Confidentiality of the message body remains intact. However, an attacker can forge or modify unencrypted parts of the message.

If we don't use WS-Security headers in our SOAP messages, are we affected?

No. If your service does not employ WS-Security (no signatures, timestamps, or credentials in headers), the Wss4jSecurityInterceptor is not active and this vulnerability does not apply to you. Verify your Spring configuration to confirm Wss4jSecurityInterceptor is not registered.

Can we work around this without patching?

Partial mitigation is possible via network segmentation and additional validation at the application layer, but these are not substitutes for the patch. You should not rely on workarounds long-term. Coordinate with your Spring Web Services maintainer on patch availability for your version branch.

What does 'BSP compliance' mean in this context?

The WS-I Basic Security Profile defines strict requirements for how WS-Security headers must be structured, signed, and canonicalized. BSP compliance ensures strict adherence to these rules. When enforcement is disabled, messages that violate BSP rules are accepted anyway, which can enable signature spoofing, credential misuse, or message tampering.

This analysis is based on the CVE record and public advisory information as of the modification date. Verify patch version numbers and availability directly with Spring projects' security advisory. No active KEV exploitation has been documented as of publication. This document does not constitute legal or compliance advice; organizations must assess risk in their own operational context and regulatory environment. Always test patches in non-production before deployment. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).