56
Phase: Implementation
Strategy = Input Validation
Inputs 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.
Observed Examples
Reference Description
CVE-2022-20775 A cloud management tool allows attackers to bypass the restricted shell using
path traversal sequences like "/../" in the USER environment variable.
https://www.cve.org/CVERecord?id=CVE-2022-20775
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 981 SFP Secondary Cluster: Path Traversal 888 2409
MemberOf 1404 Comprehensive Categorization: File Handling 1400 2529
Taxonomy Mappings
Mapped Taxonomy Name Node ID Fit Mapped Node Name
PLOVER '/../filedir
Software Fault Patterns SFP16 Path Traversal
CWE-26: Path Traversal: '/dir/../filename'
Weakness ID : 26
Structure : Simple
Abstraction : Variant
Description
The product uses external input to construct a pathname that should be within a restricted
directory, but it does not properly neutralize "/dir/../filename" sequences that can resolve to a
location that is outside of that directory.
Extended Description
This allows attackers to traverse the file system to access files or directories that are outside of the
restricted directory.
The '/dir/../filename' manipulation is useful for bypassing some path traversal protection schemes.
Sometimes a program only checks for "../" at the beginning of the input, so a "/../" can bypass that
check.
Relationships
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
Relevant to the view "Research Concepts" (CWE-1000)
CWE Version 4.14
CWE-26: Path Traversal: '/dir/../filename'
CWE-26: Path Traversal: '/dir/../filename'