Every CVE Search/ Get API key

CVE-2022-23457

Path Traversal in ESAPI

7.5 HighPublic exploitFix available

ESAPI (The OWASP Enterprise Security API) is a free, open source, web application security control library. Prior to version 2.3.0.0, the default implementation of Validator.getValidDirectoryPath(String, String, File, boolean) may incorrectly treat the tested input string as a child of the specified parent directory. This potentially could allow control-flow bypass checks to be defeated if an attack can specify the entire string representing the 'input' path. This vulnerability is patched in release 2.3.0.0 of ESAPI. As a workaround, it is possible to write one's own implementation of the Validator interface. However, maintainers do not recommend this.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
Low
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

2.85%Up 2.0 points since Apr 26, 2022
90%50%10%1%

What each source reports

CVE List Score used 7.5

Path Traversal in ESAPI

ESAPI (The OWASP Enterprise Security API) is a free, open source, web application security control library. Prior to version 2.3.0.0, the default implementation of Validator.getValidDirectoryPath(String, String, File, boolean) may incorrectly treat the tested input string as a child of the specified parent directory. This potentially could allow control-flow bypass checks to be defeated if an attack can specify the entire string representing the 'input' path. This vulnerability is patched in release 2.3.0.0 of ESAPI. As a workaround, it is possible to write one's own implementation of the Validator interface. However, maintainers do not recommend this.

Record
CVE-2022-23457
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-22
Updated
2026-11-02
EUVDEUVD-2022-1678 7.5

ESAPI (The OWASP Enterprise Security API) is a free, open source, web application security control library. Prior to version 2.3.0.0, the default implementation of Validator.getValidDirectoryPath(String, String, File, boolean) may incorrectly treat the tested input string as a child of the specified parent directory. This potentially could allow control-flow bypass checks to be defeated if an attack can specify the entire string representing the 'input' path. This vulnerability is patched in release 2.3.0.0 of ESAPI. As a workaround, it is possible to write one's own implementation of the Validator interface. However, maintainers do not recommend this.

Record
EUVD-2022-1678
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-8m5h-hrqm-pxm2 7.5

Path traversal in the OWASP Enterprise Security API

Impact

The default implementation of Validator.getValidDirectoryPath(String, String, File, boolean) may incorrectly treat the tested input string as a child of the specified parent directory. This potentially could allow control-flow bypass checks to be defeated if an attack can specify the entire string representing the 'input' path.

Patches

This vulnerability is patched in release 2.3.0.0 of ESAPI. See https://github.com/ESAPI/esapi-java-legacy/releases/tag/esapi-2.3.0.0 for details.

Workarounds

Yes; in theory, one could write the own implementation of the Validator interface. This would most easily be done by sub-classing a version of the affected DefaultValidator class and then overriding the affected getValidDirectoryPath() to correct the issue. However, this is not recommended.

For more information

If you have any questions or comments about this advisory:

Record
GHSA-8m5h-hrqm-pxm2
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-22
Updated
2026-11-02
NVD 7.5

ESAPI (The OWASP Enterprise Security API) is a free, open source, web application security control library. Prior to version 2.3.0.0, the default implementation of Validator.getValidDirectoryPath(String, String, File, boolean) may incorrectly treat the tested input string as a child of the specified parent directory. This potentially could allow control-flow bypass checks to be defeated if an attack can specify the entire string representing the 'input' path. This vulnerability is patched in release 2.3.0.0 of ESAPI. As a workaround, it is possible to write one's own implementation of the Validator interface. However, maintainers do not recommend this.

Record
CVE-2022-23457
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-22
Updated
2026-11-02
OSV 7.5

Path Traversal in ESAPI

ESAPI (The OWASP Enterprise Security API) is a free, open source, web application security control library. Prior to version 2.3.0.0, the default implementation of Validator.getValidDirectoryPath(String, String, File, boolean) may incorrectly treat the tested input string as a child of the specified parent directory. This potentially could allow control-flow bypass checks to be defeated if an attack can specify the entire string representing the 'input' path. This vulnerability is patched in release 2.3.0.0 of ESAPI. As a workaround, it is possible to write one's own implementation of the Validator interface. However, maintainers do not recommend this.

Record
CVE-2022-23457
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-22
Updated
2026-11-02
OSVDEBIAN-CVE-2022-23457 9.8

ESAPI (The OWASP Enterprise Security API) is a free, open source, web application security control library. Prior to version 2.3.0.0, the default implementation of Validator.getValidDirectoryPath(String, String, File, boolean) may incorrectly treat the tested input string as a child of the specified parent directory. This potentially could allow control-flow bypass checks to be defeated if an attack can specify the entire string representing the 'input' path. This vulnerability is patched in release 2.3.0.0 of ESAPI. As a workaround, it is possible to write one's own implementation of the Validator interface. However, maintainers do not recommend this.

Record
DEBIAN-CVE-2022-23457
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-03
OSVGHSA-8m5h-hrqm-pxm2 7.5

Path traversal in the OWASP Enterprise Security API

Impact

The default implementation of Validator.getValidDirectoryPath(String, String, File, boolean) may incorrectly treat the tested input string as a child of the specified parent directory. This potentially could allow control-flow bypass checks to be defeated if an attack can specify the entire string representing the 'input' path.

Patches

This vulnerability is patched in release 2.3.0.0 of ESAPI. See https://github.com/ESAPI/esapi-java-legacy/releases/tag/esapi-2.3.0.0 for details.

Workarounds

Yes; in theory, one could write the own implementation of the Validator interface. This would most easily be done by sub-classing a version of the affected DefaultValidator class and then overriding the affected getValidDirectoryPath() to correct the issue. However, this is not recommended.

For more information

If you have any questions or comments about this advisory:

Record
GHSA-8m5h-hrqm-pxm2
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-22
Updated
2026-11-02
OSVUBUNTU-CVE-2022-23457 7.5

ESAPI (The OWASP Enterprise Security API) is a free, open source, web application security control library. Prior to version 2.3.0.0, the default implementation of Validator.getValidDirectoryPath(String, String, File, boolean) may incorrectly treat the tested input string as a child of the specified parent directory. This potentially could allow control-flow bypass checks to be defeated if an attack can specify the entire string representing the 'input' path. This vulnerability is patched in release 2.3.0.0 of ESAPI. As a workaround, it is possible to write one's own implementation of the Validator interface. However, maintainers do not recommend this.

Record
UBUNTU-CVE-2022-23457
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUSN-8181-1 No score

libowasp-esapi-java vulnerabilities

Jaroslav Lobačevski discovered that ESAPI incorrectly validated directory paths during path verification. An attacker could possibly use this issue to bypass directory validation checks, leading to control-flow bypass. This issue only affected Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, Ubuntu 20.04 LTS, and Ubuntu 22.04 LTS. (CVE-2022-23457)

Kevin W. Wall and Sebastian Passaro discovered that ESAPI did not properly sanitize javascript URLs because of an incorrect regular expression. An attacker could possibly use this issue to perform a cross-site scripting attack. This issue only affected Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, Ubuntu 20.04 LTS, and Ubuntu 22.04 LTS. (CVE-2022-24891)

Longlong Gong discovered that ESAPI did not properly neutralize special elements during SQL injection defense. A remote attacker could possibly use this issue to perform SQL injection. (CVE-2025-5878)

Record
USN-8181-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
org.owasp.esapi:esapi
Maven
through 2.2.3.1
2.3.0.0
libowasp-esapi-java
Debian:12
before 2.4.0.0-1
2.4.0.0-1
libowasp-esapi-java
Debian:13
before 2.4.0.0-1
2.4.0.0-1
libowasp-esapi-java
Debian:11
From an advisory covering 3 CVEs
before 2.4.0.0-0+deb11u1, plus listed versions
2.1.0-3.12.2.3.1-12.2.3.1-1~bpo11+1
2.4.0.0-0+deb11u1
org.owasp.esapi:esapi
Maven
before 2.3.0.0, plus listed versions
2.0.12.0GA2.0_rc102.0_rc112.0_rc9
Show 11 moreShow less
2.1.02.1.0.12.2.0.02.2.0.0-RC22.2.0.0-RC32.2.1.02.2.1.0-RC12.2.1.12.2.2.02.2.3.02.2.3.1
2.3.0.0
libowasp-esapi-java
Ubuntu:Pro:16.04:LTS
before 2.1.0-2ubuntu0.1~esm1, plus listed versions
2.1.0-2
2.1.0-2ubuntu0.1~esm1
libowasp-esapi-java
Ubuntu:Pro:18.04:LTS
before 2.1.0-3ubuntu0.18.04.1~esm1, plus listed versions
2.1.0-3
2.1.0-3ubuntu0.18.04.1~esm1
libowasp-esapi-java
Ubuntu:Pro:20.04:LTS
before 2.1.0-3ubuntu0.20.04.1~esm1, plus listed versions
2.1.0-3
2.1.0-3ubuntu0.20.04.1~esm1
libowasp-esapi-java
Ubuntu:Pro:22.04:LTS
before 2.2.3.1-1ubuntu0.1~esm1, plus listed versions
2.1.0-3.12.2.3.1-1
2.2.3.1-1ubuntu0.1~esm1
libowasp-esapi-java
Ubuntu:24.04:LTS
before 2.4.0.0-2ubuntu0.1, plus listed versions
2.4.0.0-2
2.4.0.0-2ubuntu0.1

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
PoC in GitHubshoucheng3/ESAPI__esapi-java-legacy_CVE-2022-23457_2-2-3-12025-08-16

History

History
RecordedChangedSources
affected, factsOSV
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-23457 is a high vulnerability (CVSS 7.5) in Owasp Enterprise Security Api, published April 25, 2022. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 2.85%, the 86th percentile. Fixed in org.owasp.esapi:esapi 2.3.0.0.

References

Show 12 moreShow less
MoveEnter Open