Weaknesses of type CWE-22

6,542 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-2024-48884MEDIUMA improper limitation of a pathname to a restricted directory ('path traversal') vulnerability in Fortinet FortiManager 7.6.0 through 7.6.1,EPSS 15.2%CVE-2021-32804HIGHArbitrary File Creation/Overwrite due to insufficient absolute path sanitizationEPSS 15.1%CVE-2022-1391—Cab fare calculator < 1.0.4 - Unauthenticated LFIEPSS 15.1%CVE-2022-24715HIGHArbitrary code execution for authenticated users in Icinga Web 2EPSS 14.9%CVE-2019-3816HIGHOpenwsman, versions up to and including 2.6.9, are vulnerable to arbitrary file disclosure because the working directory of openwsmand daemoEPSS 14.7%CVE-2026-28208MEDIUMJunrar has arbitrary file write due to backslash path traversal bypass in LocalFolderExtractor on Linux/UnixEPSS 14.7%CVE-2017-11152—Directory traversal vulnerability in PixlrEditorHandler.php in Synology Photo Station before 6.7.3-3432 and 6.3-2967 allows remote attackersEPSS 14.6%CVE-2024-46987HIGHArbitrary path traversal in Camaleon CMSEPSS 14.6%CVE-2025-27210HIGHAn incomplete fix has been identified for CVE-2025-23084 in Node.js, specifically affecting Windows device names like CON, PRN, and AUX. EPSS 14.3%CVE-2019-15982HIGHCisco Data Center Network Manager Path Traversal VulnerabilitiesEPSS 14.3%CVE-2019-15981HIGHCisco Data Center Network Manager Path Traversal VulnerabilitiesEPSS 14.3%CVE-2024-53961HIGHColdFusion | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (CWE-22)EPSS 14.2%CVE-2024-21518HIGHThis affects versions of the package opencart/opencart from 4.0.0.0. A Zip Slip issue was identified via the marketplace installer due to imEPSS 14.1%CVE-2022-3387MEDIUM Advantech R-SeeNet Versions 2.4.19 and prior are vulnerable to path traversal attacks. An unauthorized attacker could remotely exploit vulnEPSS 14.0%CVE-2025-61913CRITICALFlowise is vulnerable to arbitrary file read, arbitrary file writeEPSS 13.9%CVE-2022-24785HIGHPath Traversal in Moment.jsEPSS 13.8%CVE-2024-6255HIGHPath Traversal in gaizhenbiao/chuanhuchatgptEPSS 13.7%CVE-2024-45241HIGHA traversal vulnerability in GeneralDocs.aspx in CentralSquare CryWolf (False Alarm Management) through 2024-08-09 allows unauthenticated atEPSS 13.6%CVE-2019-1820MEDIUMCisco Prime Infrastructure and Evolved Programmable Network Manager Path Traversal VulnerabilityEPSS 13.6%CVE-2019-1818MEDIUMCisco Prime Infrastructure and Evolved Programmable Network Manager Path Traversal VulnerabilityEPSS 13.6%