Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-24 (路径遍历:’../filedir’) — Vulnerability Class 91

91 vulnerabilities classified as CWE-24 (路径遍历:’../filedir’). AI Chinese analysis included.

CWE-24 represents a critical input validation weakness where software fails to properly sanitize user-supplied data before constructing file paths. Attackers typically exploit this vulnerability by injecting directory traversal sequences, such as "../", into input fields to manipulate the resulting pathname. This manipulation allows the application to resolve paths outside the intended restricted directory, enabling unauthorized access to sensitive system files, configuration data, or source code. To mitigate this risk, developers must implement robust input validation strategies that strictly whitelist allowed characters and reject any path components containing traversal sequences. Additionally, employing canonicalization techniques to normalize paths before validation ensures that encoded or double-encoded attacks are detected. Restricting file system access through chroot jails or containerization further limits the potential impact of successful exploitation, ensuring that even if validation fails, the attacker cannot escape the designated secure boundary.

MITRE CWE Description
The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize "../" sequences that can resolve to a location that is outside of that directory. This allows attackers to traverse the file system to access files or directories that are outside of the restricted directory. The "../" manipulation is the canonical manipulation for operating systems that use "/" as directory separators, such as UNIX- and Linux-based systems. In some cases, it is useful for bypassing protection schemes in environments for which "/" is supported but not the primary separator, such as Windows, which uses "\" but can also accept "/".
Common Consequences (1)
Confidentiality, IntegrityRead Files or Directories, Modify Files or Directories
Mitigations (2)
ImplementationAssume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range…
ImplementationInputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.

Vulnerabilities classified as CWE-24 (路径遍历:’../filedir’) represent 91 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.