Weaknesses of type CWE-22

6,630 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-2021-29087HIGHImproper limitation of a pathname to a restricted directory ('Path Traversal') vulnerability in webapi component in Synology DiskStation ManEPSS 1.4%CVE-2025-24406HIGHAdobe Commerce | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (CWE-22)EPSS 1.4%CVE-2021-32643MEDIUMStaticFile.fromUrl can leak presence of a directoryEPSS 1.4%CVE-2025-61624MEDIUMAn Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') [CWE-22] vulnerability in Fortinet FortiOS 7.6.0 through 7EPSS 1.4%KEVCVE-2026-102119HIGHKiteworks Email Protection Gateway Path TraversalEPSS 1.4%CVE-2022-27618MEDIUMImproper limitation of a pathname to a restricted directory ('Path Traversal') vulnerability in webapi component in Synology Storage AnalyzeEPSS 1.4%CVE-2025-53793HIGHAzure Stack Hub Information Disclosure VulnerabilityEPSS 1.4%CVE-2025-54802CRITICALpyLoad CNL Blueprint is vulnerable to Path Traversal through `dlc_path` leading to Remote Code Execution (RCE)EPSS 1.4%CVE-2022-3389HIGHPath Traversal in ikus060/rdiffwebEPSS 1.4%CVE-2024-11150CRITICALWordPress User Extra Fields <= 16.6 - Unauthenticated Arbitrary File DeletionEPSS 1.4%CVE-2024-36512HIGHAn improper limitation of a pathname to a restricted directory ('path traversal') in Fortinet FortiManager, FortiAnalyzer 7.4.0 through 7.4.EPSS 1.4%CVE-2025-27519CRITICALCognita Arbitrary File WriteEPSS 1.4%CVE-2024-31860MEDIUMApache Zeppelin: Path traversal vulnerabilityEPSS 1.4%CVE-2026-9506HIGHPath Traversal Vulnerability in BagistoEPSS 1.4%CVE-2020-7494—A CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability exists in EcoStruxure Operator TerminEPSS 1.4%CVE-2022-21192HIGHAll versions of the package serve-lite are vulnerable to Directory Traversal due to missing input sanitization or other checks and protectioEPSS 1.4%CVE-2022-0493—String Locator < 2.5.0 - Admin+ Arbitrary File ReadEPSS 1.4%CVE-2023-6972CRITICALBackup Migration <= 1.3.9 - Unauthenticated Path Traversal to Arbitrary File DeletionEPSS 1.4%CVE-2021-22933—A vulnerability in Pulse Connect Secure before 9.1R12 could allow an authenticated administrator to perform an arbitrary file delete via a mEPSS 1.4%CVE-2022-25936HIGHVersions of the package servst before 2.0.3 are vulnerable to Directory Traversal due to improper sanitization of the filePath variable. EPSS 1.4%