CVE-2022-23457
Java vulnerability analysis and mitigation

Overview

CVE-2022-23457 affects ESAPI (The OWASP Enterprise Security API), a free, open source, web application security control library. The vulnerability was discovered in versions prior to 2.3.0.0, where the default implementation of Validator.getValidDirectoryPath(String, String, File, boolean) could incorrectly treat the tested input string as a child of the specified parent directory. The vulnerability was discovered by GitHub Security Lab researcher Jaroslav Lobačevski and was disclosed on January 31, 2022, with a fix released on April 17, 2022 (GitHub Advisory).

Technical details

The vulnerability stems from an implementation flaw in the getValidDirectoryPath method where if the result of parent.getCanonicalPath() is not slash terminated, it allows for partial path traversal. For example, '/usr/outnot'.startsWith('/usr/out') would pass the validation check even though 'outnot' is not under the 'out' directory. The vulnerability has been assigned a CVSS score of 7.5 (HIGH) with the vector CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H (NetApp Advisory).

Impact

Successful exploitation of this vulnerability could allow an attacker to break out of the expected directory structure. This potentially could allow control-flow bypass checks to be defeated if an attacker can specify the entire string representing the 'input' path, leading to unauthorized access to files outside the intended directory (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in ESAPI version 2.3.0.0. While it is theoretically possible to write a custom implementation of the Validator interface by sub-classing the affected DefaultValidator class and overriding the affected getValidDirectoryPath() method, this approach is not recommended by the maintainers. The best mitigation is to upgrade to ESAPI version 2.3.0.0 or later (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66516CRITICAL10
  • JavaJava
  • tika
NoYesDec 04, 2025
CVE-2025-66566HIGH8.2
  • JavaJava
  • org.lz4:lz4-java
NoYesDec 05, 2025
CVE-2025-66623HIGH7.4
  • JavaJava
  • io.strimzi:strimzi
NoYesDec 05, 2025
CVE-2025-11222MEDIUM6.1
  • JavaJava
  • com.linecorp.centraldogma:centraldogma-server-auth-shiro
NoYesDec 04, 2025
CVE-2025-66453MEDIUM5.5
  • JavaJava
  • org.mozilla:rhino
NoYesDec 03, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management