VYPR
High severityNVD Advisory· Published Sep 19, 2021· Updated Aug 4, 2024

Bypass of the secureValidation property

CVE-2021-40690

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.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Apache Santuario prior to 2.2.3 and 2.1.7 fails to enforce secureValidation on KeyInfoReference, enabling XPath-based local XML file disclosure.

Vulnerability

The vulnerability in Apache Santuario – XML Security for Java affects all versions prior to 2.2.3 and 2.1.7. The bug is that the secureValidation property is not passed correctly when creating a KeyInfo from a KeyInfoReference element. This oversight allows an attacker to embed a RetrievalMethod element that uses an XPath Transform, and due to the missing security validation, the XPath transform can be abused to extract arbitrary local .xml files [1].

Exploitation

The attacker requires the ability to supply a crafted XML signature or encryption document that includes a KeyInfoReference pointing to a malicious RetrievalMethod. The attacker does not need authentication or special privileges beyond being able to send the malformed input to an application using Apache Santuario. By using an XPath Transform in the RetrievalMethod, the attacker can read any .xml file on the local filesystem [1].

Impact

Successful exploitation leads to local file disclosure (information disclosure) of .xml files. The attacker can read sensitive XML configuration files, keystores, or other XML data that the application process has access to. The CIA impact is limited to confidentiality Loss; no direct code execution or privilege escalation is described in the available references [1].

Mitigation

Users should upgrade to Apache Santuario – XML Security for Java version 2.2.3 or 2.1.7, which contain the fix. The fix ensures that secureValidation is properly enforced when handling KeyInfoReference elements. No workaround is available in the references [1].

AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
org.apache.santuario:xmlsecMaven
>= 2.2.0, < 2.2.32.2.3
org.apache.santuario:xmlsecMaven
< 2.1.72.1.7

Affected products

6

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

25

News mentions

0

No linked articles in our index yet.