# CVE-2021-40690: Bypass of the secureValidation property

> An attacker can exploit an XPath Transform to extract local XML files due to improper handling of the secureValidation property in Apache Santuario.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/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:** 19 Sep 2021
- **Updated:** 8 Oct 2026
- **Also known as:** DEBIAN-CVE-2021-40690, DLA-2767-1, DSA-5010-1, GHSA-j8wc-gxx9-82hx, UBUNTU-CVE-2021-40690, USN-5525-1

## What is CVE-2021-40690?

CVE-2021-40690 is a high-severity vulnerability in Apache Cxf, published on 19 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

All versions of Apache Santuario - XML Security for Java prior to 2.2.3 and 2.1.7 are vulnerable to an issue where the "secureValidation" property is not passed correctly when creating a KeyInfo from a KeyInfoReference element. This allows an attacker to abuse an XPath Transform to extract any local .xml files in a RetrievalMethod element.

Weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2021-40690?

4 open source packages ship an affected version, including org.apache.santuario:xmlsec. It affects 18 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.santuario:xmlsec` | Maven | All versions | 2.1.7 |
| `org.apache.santuario:xmlsec` | Maven | All versions | 2.1.7 |
| `org.apache.santuario:xmlsec` | Maven | From 2.2.0 | 2.2.3 |
| `org.apache.santuario:xmlsec` | Maven | From 2.2.0 | 2.2.3 |

Products: Apache Cxf, Apache Santuario Xml Security for Java, Apache Tomee, Debian Debian Linux, Oracle Agile Product Lifecycle Management, Oracle Commerce Guided Search, Oracle Commerce Platform, Oracle Communications Diameter Intelligence Hub, Oracle Communications Messaging Server, Oracle Flexcube Private Banking, Oracle Outside in Technology, Oracle Peoplesoft Enterprise Peopletools, Oracle Retail Bulk Data Integration, Oracle Retail Financial Integration, Oracle Retail Integration Bus, Oracle Retail Merchandising System, Oracle Retail Service Backbone, Oracle Weblogic Server.

## How do I fix CVE-2021-40690?

Upgrade org.apache.santuario:xmlsec to a fixed version for your release line: 2.1.7 or 2.2.3.

## Is CVE-2021-40690 being exploited?

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

## Other vulnerabilities in Apache Cxf

- [CVE-2012-2379](https://insights.sbomify.com/CVE-2012-2379/): XML Signature/Encryption Not Validated in Apache CXF (critical 10.0)
- [CVE-2026-66909](https://insights.sbomify.com/CVE-2026-66909/): Apache CXF: Unsafe deserialization of inbound JMS ObjectMessage (critical 9.8)
- [CVE-2026-68079](https://insights.sbomify.com/CVE-2026-68079/): Apache CXF: DefaultEncryptingCodeDataProvider allows unlimited authorization code replay (critical 9.8)
- [CVE-2026-50628](https://insights.sbomify.com/CVE-2026-50628/): Apache CXF: OAuth2: Inverted IP Binding Check Defeats Security Control (critical 9.8)
- [CVE-2025-48913](https://insights.sbomify.com/CVE-2025-48913/): Apache CXF: Untrusted JMS configuration can lead to RCE (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-40690 and fix it if it is affected.

What it is: CVE-2021-40690 is a high-severity vulnerability in Apache Cxf, published on 19 Sep 2021. 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-2021-40690 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.santuario:xmlsec (Maven): affected all versions; fixed in 2.1.7
- org.apache.santuario:xmlsec (Maven): affected all versions; fixed in 2.1.7
- org.apache.santuario:xmlsec (Maven): affected from 2.2.0; fixed in 2.2.3
- org.apache.santuario:xmlsec (Maven): affected from 2.2.0; fixed in 2.2.3

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-2021-40690/ (Markdown: https://insights.sbomify.com/CVE-2021-40690/index.md)
```

## Sources

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

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