# CVE-2026-40996: Inbound WS-Security allows RSA PKCS#1 v1.5 key transport by default

> Spring Web Services defaults to insecure RSA PKCS#1 v1.5 key transport, allowing attackers to bypass cryptographic protections in inbound WS-Security decryption.

- **Severity:** Medium 4.8 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 11 Jun 2026
- **Updated:** 23 Jun 2026
- **Also known as:** GHSA-p7qj-2q5w-f9r7

## What is CVE-2026-40996?

CVE-2026-40996 is a medium-severity vulnerability in Spring Web Services, published on 11 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Wss4jSecurityInterceptor defaulted allowRSA15KeyTransportAlgorithm to true, overriding Apache WSS4J's safer default for validation RequestData. Inbound WS-Security decryption could therefore accept RSA PKCS#1 v1.5 (rsa-1_5) encrypted key material unless operators explicitly reconfigured the flag.

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.

Weakness: CWE-327 (Use of a Broken or Risky Cryptographic Algorithm)

## Which versions are affected by CVE-2026-40996?

8 open source packages ship an affected version, including org.springframework.ws:spring-ws-security. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework.ws:spring-ws-security` | Maven | From 3.1.0 to 3.1.8 | None |
| `org.springframework.ws:spring-ws-security` | Maven | From 3.1.0 to 3.1.8 | None |
| `org.springframework.ws:spring-ws-security` | Maven | From 4.0.0 to 4.0.18 | None |
| `org.springframework.ws:spring-ws-security` | Maven | From 4.0.0 to 4.0.18 | None |
| `org.springframework.ws:spring-ws-security` | Maven | From 4.1.0 | 4.1.4 |
| `org.springframework.ws:spring-ws-security` | Maven | From 4.1.0 | 4.1.4 |
| `org.springframework.ws:spring-ws-security` | Maven | From 5.0.0 | 5.0.2 |
| `org.springframework.ws:spring-ws-security` | Maven | From 5.0.0 | 5.0.2 |

Products: Broadcom Spring Web Services.

## How do I fix CVE-2026-40996?

Upgrade org.springframework.ws:spring-ws-security to a fixed version for your release line: 4.1.4 or 5.0.2.

## Is CVE-2026-40996 being exploited?

There is no known exploitation of CVE-2026-40996 in the wild and no public exploit code.

## Other vulnerabilities in Spring Web Services

- [CVE-2019-3773](https://insights.sbomify.com/CVE-2019-3773/): Spring Web Services XML External Entity Injection (XXE) (critical 9.8)
- [CVE-2026-40999](https://insights.sbomify.com/CVE-2026-40999/): Spring WS SSRF via unvalidated WS-Addressing reply destinations (high 8.6)
- [CVE-2026-40994](https://insights.sbomify.com/CVE-2026-40994/): Wss4jSecurityInterceptor disables WS-I BSP validation by default (high 8.2)
- [CVE-2026-40998](https://insights.sbomify.com/CVE-2026-40998/): Jaxp13 XPath XXE via StreamSource and SAXSource (high 8.2)
- [CVE-2026-40995](https://insights.sbomify.com/CVE-2026-40995/): X.509 authentication bypasses Spring Security account checks (medium 5.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-40996 and fix it if it is affected.

What it is: CVE-2026-40996 is a medium-severity vulnerability in Spring Web Services, published on 11 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-40996 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.springframework.ws:spring-ws-security (Maven): affected from 3.1.0 up to 3.1.8; no fix listed
- org.springframework.ws:spring-ws-security (Maven): affected from 3.1.0 up to 3.1.8; no fix listed
- org.springframework.ws:spring-ws-security (Maven): affected from 4.0.0 up to 4.0.18; no fix listed
- org.springframework.ws:spring-ws-security (Maven): affected from 4.0.0 up to 4.0.18; no fix listed
- org.springframework.ws:spring-ws-security (Maven): affected from 4.1.0; fixed in 4.1.4
- org.springframework.ws:spring-ws-security (Maven): affected from 4.1.0; fixed in 4.1.4
- org.springframework.ws:spring-ws-security (Maven): affected from 5.0.0; fixed in 5.0.2
- org.springframework.ws:spring-ws-security (Maven): affected from 5.0.0; fixed in 5.0.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-40996/ (Markdown: https://insights.sbomify.com/CVE-2026-40996/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-40996
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-40996
- OSV: https://osv.dev/vulnerability/CVE-2026-40996

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-40996/
Summaries are generated and may contain mistakes; the official description above is the record.
