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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-28 (路径遍历:’..filedir’) — Vulnerability Class 1

1 vulnerabilities classified as CWE-28 (路径遍历:’..filedir’). AI Chinese analysis included.

CWE-28 represents a critical input validation weakness where applications fail to properly sanitize external data before constructing file system paths. Attackers typically exploit this vulnerability by injecting directory traversal sequences, such as “..\” or “../”, into user-controlled inputs like filenames or URL parameters. These sequences allow the application to navigate upward in the directory hierarchy, bypassing intended restrictions and accessing sensitive files outside the designated sandbox, such as system configuration files or private user data. To prevent such exploits, developers must implement strict input validation that rejects any path containing traversal characters. Additionally, using canonicalization techniques to resolve the absolute path before checking it against an allowlist of permitted directories ensures that the final location remains within the expected boundaries. Employing secure APIs that abstract direct file system access further mitigates the risk of unintended path resolution.

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 Windows. However, it is also useful for bypassing path traversal protection schemes that only assume that the "/" separator is valid.
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.
CVE IDTitleCVSSSeverityPublished
CVE-2023-2059 DedeCMS select_templets.php path traversal — DedeCMS 4.3 Medium2023-04-14

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