Weaknesses of type CWE-22

5,936 results

Traversal de diretório (path traversal)

A aplicação recebe um caminho de arquivo fornecido pelo usuário e o usa para acessar arquivos sem validar adequadamente se o resultado fica dentro do diretório permitido. Um atacante injeta sequências como '../' ou '..' para "escapar" do diretório esperado e acessar arquivos sensíveis do sistema.

Example

Um site permite download de arquivos do diretório /uploads passando o nome via URL: download.php?file=documento.pdf. Um atacante envia file=../../etc/passwd e consegue ler arquivos fora de /uploads, porque o código não neutraliza a sequência '..'.

How to mitigate

Valide e canonicalize todo caminho fornecido pelo usuário antes de usá-lo: implemente uma whitelist de nomes permitidos, normalize caminhos para sua forma canônica, verifique se o resultado está dentro do diretório esperado, e use APIs de segurança da linguagem (ex: Path.normalize() + validação de prefix em Java, pathlib em Python).

CVE-2025-54927MEDIUMCWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability exists that could cause unauthorized acEPSS 0.6%CVE-2024-49366HIGHNginx UI's json field can construct a directory traversal payload, causing arbitrary files to be writtenEPSS 0.6%CVE-2022-2184—CAPTCHA 4WP < 7.1.0 - Local File Inclusion via CSRFEPSS 0.6%CVE-2024-44014CRITICALWordPress Vmax Project Manager plugin <= 1.0 - Local File Inclusion to RCE vulnerabilityEPSS 0.6%CVE-2024-49286CRITICALWordPress SSV Events plugin <= 3.2.7 - Local File Inclusion to RCE vulnerabilityEPSS 0.6%CVE-2026-73030HIGHunearth 0.18.2 Path Traversal via Unnormalized Paths and Symlink EscapeEPSS 0.6%CVE-2026-40086MEDIUMRembg has a Path Traversal via Custom Model LoadingEPSS 0.6%CVE-2026-45731MEDIUMWWBN AVideo: Authenticated Arbitrary File Read in view/update.phpEPSS 0.6%CVE-2022-25773MEDIUMRelative Path Traversal in assets file uploadEPSS 0.6%CVE-2024-2203MEDIUMThe Plus Addons for Elementor <= 5.4.1 - Authenticated (Contributor+) Local File Inclusion via Clients WidgetEPSS 0.6%CVE-2026-65921HIGHPotential path traversal leading to unauthorized file writesEPSS 0.6%CVE-2024-31231CRITICALWordPress Rehub theme <= 19.6.1 - Unauthenticated Local File Inclusion vulnerabilityEPSS 0.6%CVE-2026-15061HIGHVulnerabilities in IBM AIX and PowerVM VIOSEPSS 0.6%CVE-2025-3046HIGHPath Traversal via Symbolic Links in run-llama/llama_indexEPSS 0.6%CVE-2026-66898CRITICALPath traversal via unvalidated instance name in backup tarball restore enables root file write / RCEEPSS 0.6%CVE-2026-34911HIGHA malicious actor with access to the network and low privileges could exploit a Path Traversal vulnerability found in UniFi OS devices to acEPSS 0.6%CVE-2025-13266MEDIUMwwwlike vlife VLifeApi SysFileApi.java create path traversalEPSS 0.6%CVE-2026-40876HIGHSFTP root escape via prefix-based path validation in goshsEPSS 0.6%CVE-2026-45556CRITICALRoxy-WI: Authenticated arbitrary file write on every managed load balancer (and downstream RCE) via WAF rule save `config_file_name`EPSS 0.6%CVE-2026-45309HIGHAsyncSSH `AuthorizedKeysFile %u` path traversal allows attacker-selected authorized keys to authenticate a traversal usernameEPSS 0.6%