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.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
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
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 | 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 include Apache Cxf, Apache Santuario Xml Security for Java, Apache Tomee, Debian Debian Linux, Oracle Agile Product Lifecycle Management, Oracle Commerce Guided Search and 12 more.
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 XML Signature/Encryption Not Validated in Apache CXF
- CVE-2026-66909 Apache CXF: Unsafe deserialization of inbound JMS ObjectMessage
- CVE-2026-68079 Apache CXF: DefaultEncryptingCodeDataProvider allows unlimited authorization code replay
- CVE-2026-50628 Apache CXF: OAuth2: Inverted IP Binding Check Defeats Security Control
- CVE-2025-48913 Apache CXF: Untrusted JMS configuration can lead to RCE
Sources
Also known as DEBIAN-CVE-2021-40690, DLA-2767-1, DSA-5010-1, GHSA-j8wc-gxx9-82hx, UBUNTU-CVE-2021-40690, USN-5525-1.