CVE-2022-23457
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.
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
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 High
CVSS: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 High
CVSS: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:
- Email one of the project co-leaders. See email addresses listed on the OWASP ESAPI wiki page, under "Leaders".
- Send email to one of the two ESAPI related Google Groups listed under Where to Find More Information on ESAPI on our README.md page.
- Record
GHSA-8m5h-hrqm-pxm2- CVSS 3.1
- 7.5 High
CVSS: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 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV: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 High
CVSS: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 Critical
CVSS: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:
- Email one of the project co-leaders. See email addresses listed on the OWASP ESAPI wiki page, under "Leaders".
- Send email to one of the two ESAPI related Google Groups listed under Where to Find More Information on ESAPI on our README.md page.
- Record
GHSA-8m5h-hrqm-pxm2- CVSS 3.1
- 7.5 High
CVSS: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 High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - CVSS 3.1
- 9.8 Critical
CVSS: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
| Package | Affected | Fixed |
|---|---|---|
org.owasp.esapi:esapiMaven |
through 2.2.3.1 | 2.3.0.0 |
libowasp-esapi-javaDebian:12 |
before 2.4.0.0-1 | 2.4.0.0-1 |
libowasp-esapi-javaDebian:13 |
before 2.4.0.0-1 | 2.4.0.0-1 |
libowasp-esapi-javaDebian: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:esapiMaven |
before 2.3.0.0, plus listed versions 2.0.12.0GA2.0_rc102.0_rc112.0_rc9 Show 11 moreShow less2.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-javaUbuntu: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-javaUbuntu: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-javaUbuntu: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-javaUbuntu: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-javaUbuntu: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.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | shoucheng3/ESAPI__esapi-java-legacy_CVE-2022-23457_2-2-3-1 | 2025-08-16 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | OSV | |
| first indexed | CVE 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
securitylab.github.com/advisories/GHSL-2022-008_The_OWASP_Enterprise_Security_API
github.com/ESAPI/esapi-java-legacy/security/advisories/GHSA-8m5h-hrqm-pxm2
github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/esapi4java-core-2.3.0.0-release-notes.txt
oracle.com/security-alerts/cpujul2022.html
security.netapp.com/advisory/ntap-20230127-0014
lists.debian.org/debian-lts-announce/2025/07/msg00010.html
Show 12 moreShow less
nvd.nist.gov/vuln/detail/CVE-2022-23457
github.com/ESAPI/esapi-java-legacy/commit/a0d67b75593878b1b6e39e2acc1773b3effedb2a
github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/GHSL-2022-008_The_OWASP_Enterprise_Security_API.md
github.com/advisories/GHSA-8m5h-hrqm-pxm2
github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23457.json
security-tracker.debian.org/tracker/CVE-2022-23457
github.com/ESAPI/esapi-java-legacy
ubuntu.com/security/CVE-2022-23457
cve.org/CVERecord?id=CVE-2022-23457
ubuntu.com/security/notices/USN-8181-1
ubuntu.com/security/CVE-2022-24891
ubuntu.com/security/CVE-2025-5878