CWE-29: Path Traversal: '\..\filename'
moderate-riskThe product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize '\..\filename' (leading backslash dot dot) sequences that can resolve to a location that is outside of that directory.
Common Consequences
Detection Methods
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Real-World Examples (10)
| CVE | CVSS | EPSS | KEV |
|---|---|---|---|
| CVE-2024-34470 | 8.6 | 93.6% | — |
| CVE-2024-1561 | 7.5 | 93.5% | — |
| CVE-2023-1177 | 9.3 | 93.3% | — |
| CVE-2024-2928 | 7.5 | 91.6% | — |
| CVE-2024-6396 | 9.8 | 90.4% | — |
| CVE-2023-2780 | 9.8 | 87.8% | — |
| CVE-2023-6021 | 7.5 | 87.3% | — |
| CVE-2023-6909 | 7.5 | 85.7% | — |
| CVE-2023-6977 | 7.5 | 83.0% | — |
| CVE-2024-3848 | 7.5 | 78.7% | — |