Cyber Posture

CWE · MITRE source

CWE-22Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Abstraction: Base · CVEs in our corpus: 8,800

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin" to access unexpected files. This is referred to as absolute path traversal.

Last updated: 09 May 2026 03:25 UTC

NIST 800-53 r5 controls that address this weakness (1)AI

Control Title Family Why it addresses this CWE
SI-10Information Input ValidationSIValidates pathnames and filenames to prevent traversal outside intended directories.

Top CVEs of this weakness type, ranked by Risk Priority

CVE Risk CVSS EPSS Published
CVE-2019-11510 KEV9.710.00.94462019-05-08
CVE-2021-41277 KEV9.710.00.94352021-11-17
CVE-2010-2861 KEV9.69.80.94152010-08-11
CVE-2019-3396 KEV9.69.80.94472019-03-25
CVE-2019-16278 KEV9.69.80.94392019-10-14
CVE-2019-7194 KEV9.69.80.93942019-12-05
CVE-2019-7195 KEV9.69.80.94112019-12-05
CVE-2019-19781 KEV9.69.80.94442019-12-27
CVE-2020-5902 KEV9.69.80.94432020-07-01
CVE-2021-21972 KEV9.69.80.93822021-02-24
CVE-2021-20090 KEV9.69.80.94372021-04-29
CVE-2021-22005 KEV9.69.80.94462021-09-23
CVE-2021-41773 KEV9.69.80.94392021-10-05
CVE-2021-42013 KEV9.69.80.94412021-10-07
CVE-2022-29464 KEV9.69.80.94432022-04-18
CVE-2022-37042 KEV9.69.80.94332022-08-12
CVE-2022-41352 KEV9.69.80.94072022-09-26
CVE-2023-47246 KEV9.69.80.94382023-11-10
CVE-2024-23897 KEV9.69.80.94472024-01-24
CVE-2024-32113 KEV9.69.80.93962024-05-08
CVE-2024-4885 KEV9.69.80.94262024-06-25
CVE-2018-13379 KEV9.59.10.94472019-06-04
CVE-2024-8963 KEV9.59.40.94162024-09-19
CVE-2024-41713 KEV9.59.10.94142024-10-21
CVE-2018-14847 KEV9.49.10.93652018-08-02