Quick answers
- Is CVE-2026-40995 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-40995 being exploited in the wild.
- How severe is CVE-2026-40995?
- Medium severity, with a CVSS score of 5.4, published 11 June 2026.
- Which products and versions are affected?
- org.springframework.ws:spring-ws-security (Maven) ECOSYSTEM:introduced=5.0.0,fixed=5.0.2; VMware 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.
- Is there a fix for CVE-2026-40995?
- Yes. org.springframework.ws:spring-ws-security (Maven): upgrade to 5.0.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-40995 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-40995?
- Check whether you run org.springframework.ws:spring-ws-security (Maven) or VMware Spring Web Services at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- org.springframework.ws:spring-ws-security (Maven): upgrade to 5.0.2 or later
# set org.springframework.ws:spring-ws-security to 5.0.2 in your pom.xml or build.gradle
Technical details
The vulnerability is an improper authentication flaw (CWE-287) in the X509AuthenticationProvider class, which processes X.509 certificate-based authentication. When a certificate successfully maps to UserDetails, the provider issues a fully authenticated X509AuthenticationToken without applying Spring Security's standard account lifecycle checks (disabled, locked, expired, credentials-expired states). This affects both fresh user loads via X509AuthoritiesPopulator and cached entries from X509UserCache. The attack requires the attacker to possess a valid certificate that maps to a user account, but does not require additional privileges or user interaction. The fix enforces UserDetailsChecker strategy (defaulting to AccountStatusUserDetailsChecker) similar to AbstractUserDetailsAuthenticationProvider, allowing disabled/locked/expired accounts to be rejected. Patches are available in versions 5.0.2, 4.1.4, and later.
Affected products
- Pivotal Spring Web Services 5.0.0-5.0.1, 4.1.0-4.1.3, 4.0.0-4.0.18, 3.1.0-3.1.8
Identifiers
- CVE-2026-40995
- GHSA-6mfm-98wv-32wm
Timeline
- 2026-06-11: disclosed: Published to GitHub Advisory Database and NVD
- 2026-08-21: advisory: GitHub reviewed and updated advisory
- 2026-06-11: patched: Patches released: 5.0.2, 4.1.4 available; 4.0.x and 3.1.x appear unpatched