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).

Exploitability

The vulnerability is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory - 'Path Traversal'). It requires network access and low privileges for exploitation, though with high attack complexity. The vulnerability has been confirmed to be exploitable when an attacker can control the input path string (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-2026-10050HIGH8.7
  • Java logoJava
  • spark-kubernetes-operator-fips
NoYesAug 04, 2026
CVE-2026-56818MEDIUM6.5
  • Java logoJava
  • netty-javadoc
NoYesAug 07, 2026
CVE-2026-48047MEDIUM5.9
  • Java logoJava
  • org.xwiki.platform:xwiki-platform-webjars-api
NoYesAug 07, 2026
CVE-2026-53573MEDIUM4.8
  • Java logoJava
  • org.geonetwork-opensource:geonetwork
NoYesJul 31, 2026
CVE-2026-71497MEDIUM4.7
  • Java logoJava
  • jsoup
NoYesAug 06, 2026

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