BaseStableTop 25 #5

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

Category: other

Description

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.

Common consequences· 4

  • Integrity / Confidentiality / Availability — Execute Unauthorized Code or Commands
    The attacker may be able to create or overwrite critical files that are used to execute code, such as programs or libraries.
  • Integrity — Modify Files or Directories
    The attacker may be able to overwrite or create critical files, such as programs, libraries, or important data. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, appending a new account at the end of a password file may allow an attacker to bypass authentication.
  • Confidentiality — Read Files or Directories
    The attacker may be able read the contents of unexpected files and expose sensitive data. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, by reading a password file, the attacker could conduct brute force password guessing attacks in order to break into an account on the system.
  • Availability — DoS: Crash, Exit, or Restart
    The attacker may be able to overwrite, delete, or corrupt unexpected critical files such as programs, libraries, or important data. This may prevent the product from working at all and in the case of protection mechanisms such as authentication, it has the potential to lock out product users.

Potential mitigations· 5

  • [Implementation]
  • [Architecture and Design]For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
  • [Implementation]
  • [Architecture and Design]Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
  • [Operation]Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].

Related CAPEC attack patterns· 5

CAPEC-126CAPEC-64CAPEC-76CAPEC-78CAPEC-79

References

  1. https://cwe.mitre.org/data/definitions/22.html

Exploits (incoming)3

TypeTargetConfidenceTier
AttackPatternUsing Slashes and URL Encoding Combined to Bypass Validation Logiccapec-64100%live
AttackPatternUsing Escaped Slashes in Alternate Encodingcapec-78100%live
AttackPatternUsing Slashes in Alternate Encodingcapec-79100%live

Compliance frameworks addressing this (incoming)3

TypeTargetConfidenceTier
ComplianceControliso27001-a.8.28100%live
ComplianceControltiber_eu-preparation100%live
ComplianceControlnis2-art21f100%live

(incoming)144

TypeTargetConfidenceTier
VulnerabilityCVE-2025-0332cve-2025-03320%live
VulnerabilityCVE-2025-0493cve-2025-04930%live
VulnerabilityCVE-2025-10283cve-2025-102830%live
VulnerabilityCVE-2025-10284cve-2025-102840%live
VulnerabilityCVE-2025-10449cve-2025-104490%live
VulnerabilityCVE-2025-10488cve-2025-104880%live
VulnerabilityCVE-2025-10559cve-2025-105590%live
VulnerabilityCVE-2025-10897cve-2025-108970%live
VulnerabilityCVE-2025-11020cve-2025-110200%live
VulnerabilityCVE-2025-11079cve-2025-110790%live
VulnerabilityCVE-2025-11139cve-2025-111390%live
VulnerabilityCVE-2025-11201cve-2025-112010%live
VulnerabilityCVE-2025-11221cve-2025-112210%live
VulnerabilityCVE-2025-1127cve-2025-11270%live
VulnerabilityCVE-2025-11366cve-2025-113660%live
VulnerabilityCVE-2025-11531cve-2025-115310%live
VulnerabilityCVE-2025-11607cve-2025-116070%live
VulnerabilityCVE-2025-11630cve-2025-116300%live
VulnerabilityCVE-2025-11631cve-2025-116310%live
VulnerabilityCVE-2025-11746cve-2025-117460%live
VulnerabilityCVE-2025-11849cve-2025-118490%live
VulnerabilityCVE-2025-11941cve-2025-119410%live
VulnerabilityCVE-2025-12062cve-2025-120620%live
VulnerabilityCVE-2025-12382cve-2025-123820%live
VulnerabilityCVE-2025-12422cve-2025-124220%live
VulnerabilityCVE-2025-12490cve-2025-124900%live
VulnerabilityCVE-2025-12493cve-2025-124930%live
VulnerabilityCVE-2025-12638cve-2025-126380%live
VulnerabilityCVE-2025-1282cve-2025-12820%live
VulnerabilityCVE-2025-12824cve-2025-128240%live

Showing top 30 of 144 by confidence. Click any target to see the full neighbourhood.

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CWE
Path Traversal: 'dir/../../filename'
CWE
Path Traversal: '/dir/../filename'
CWE
Path Traversal: '/../filedir'
CWE
Path Traversal: '../filedir'
CWE
Path Traversal: 'dir\..\..\filename'
CWE
Path Traversal: '..\filedir'
Sourced from MITRE CWE 4.20. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.