CVE-2022-23457
JSON

7.5high

Path Traversal in ESAPI

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
2.85% (higher than 87% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8m5h-hrqm-pxm2

Description

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.

Affected

Product or packageVersionsReported by
OWASP ESAPI org.owasp.esapi:esapifrom 2.3.0.0 before 2.3.0.0CVE List
org.owasp.esapi:esapi (Maven)before 2.3.0.0GitHub Advisory Database
owasp enterprise_security_apibefore 2.3.0.0NVD
oracle weblogic_server12.2.1.3.0, 12.2.1.4.0, 14.1.1.0.0NVD
netapp active_iq_unified_managerNot specifiedNVD
netapp oncommand_workflow_automationNot specifiedNVD

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

CWE-22

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database
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:

NVD (es)

ESAPI (The OWASP Enterprise Security API) es una biblioteca de control de seguridad de aplicaciones web gratuita y de código abierto. En versiones anteriores a 2.3.0.0, la implementación por defecto de "Validator.getValidDirectoryPath(String, String, File, boolean)" puede tratar incorrectamente la cadena de entrada comprobada como un hijo del directorio padre especificado. Esto podría permitir que las comprobaciones de omisión de flujo de control sean derrotadas si un ataque puede especificar toda la cadena que representa la ruta "input". Esta vulnerabilidad está parcheada en versión 2.3.0.0 de ESAPI. Como medida de mitigación, es posible escribir una implementación propia de la interfaz del validador. Sin embargo, los mantenedores no lo recomiendan

References

https://securitylab.github.com/advisories/GHSL-2022-008_The_OWASP_Enterprise_Security_API/exploit, third-party-advisory
https://github.com/ESAPI/esapi-java-legacy/security/advisories/GHSA-8m5h-hrqm-pxm2patch, third-party-advisory, web
https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/esapi4java-core-2.3.0.0-release-notes.txtrelease-notes, web
https://www.oracle.com/security-alerts/cpujul2022.htmlpatch, third-party-advisory, web
https://security.netapp.com/advisory/ntap-20230127-0014/third-party-advisory
https://lists.debian.org/debian-lts-announce/2025/07/msg00010.htmlweb
https://nvd.nist.gov/vuln/detail/CVE-2022-23457advisory
https://github.com/ESAPI/esapi-java-legacy/commit/a0d67b75593878b1b6e39e2acc1773b3effedb2aweb
https://github.com/ESAPI/esapi-java-legacypackage
https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/GHSL-2022-008_The_OWASP_Enterprise_Security_API.mdweb
https://security.netapp.com/advisory/ntap-20230127-0014web
https://securitylab.github.com/advisories/GHSL-2022-008_The_OWASP_Enterprise_Security_APIadvisory

Sources

SourceRecordLicence
CVE ListCVE-2022-23457 changed 2025-11-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-8m5h-hrqm-pxm2 changed 2025-11-03CC-BY-4.0
NVDCVE-2022-23457 changed 2026-06-17Public domain