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-2023-41266HIGHA path traversal vulnerability found in Qlik Sense Enterprise for Windows for versions May 2023 Patch 3 and earlier, February 2023 Patch 7 aEPSS 84.8%KEVCVE-2015-3035HIGHDirectory traversal vulnerability in TP-LINK Archer C5 (1.2) with firmware before 150317, C7 (2.0) with firmware before 150304, and C8 (1.0)EPSS 83.9%KEVCVE-2022-36981HIGHThis vulnerability allows remote attackers to execute arbitrary code on affected installations of Ivanti Avalanche 6.3.3.101. Although autheEPSS 83.4%CVE-2024-0769MEDIUMD-Link DIR-859 HTTP POST Request hedwig.cgi path traversalEPSS 82.7%KEVCVE-2019-7194CRITICALThis external control of file name or path vulnerability allows remote attackers to access or modify system files. To fix the vulnerability,EPSS 82.7%KEVCVE-2021-41291HIGHECOA BAS controller - Path Traversal-1EPSS 82.7%CVE-2023-40502HIGHLG Simple Editor cropImage Directory Traversal Arbitrary File Deletion VulnerabilityEPSS 82.0%CVE-2023-40494HIGHLG Simple Editor deleteFolder Directory Traversal Arbitrary File Deletion VulnerabilityEPSS 82.0%CVE-2023-40492HIGHLG Simple Editor deleteCheckSession Directory Traversal Arbitrary File Deletion VulnerabilityEPSS 82.0%CVE-2022-38418CRITICALAdobe ColdFusion Application Server Directory Traversal Remote Code Execution VulnerabilityEPSS 80.4%CVE-2023-39143CRITICALPaperCut NG and PaperCut MF before 22.1.3 on Windows allow path traversal, enabling attackers to upload, read, or delete arbitrary files. ThEPSS 80.1%CVE-2023-2745MEDIUMWordPress Core < 6.2.1 - Directory TraversalEPSS 79.7%CVE-2017-11512—The ManageEngine ServiceDesk 9.3.9328 is vulnerable to arbitrary file downloads due to improper restrictions of the pathname used in the namEPSS 79.6%CVE-2022-38421HIGHAdobe ColdFusion Application Server Directory Traversal Remote Code Execution VulnerabilityEPSS 79.6%CVE-2021-21402HIGHUnauthenticated Arbitrary File Access in JellyfinEPSS 79.3%CVE-2018-18809CRITICALTIBCO JasperReports Library Directory Traversal VulnerabilityEPSS 79.1%KEVCVE-2025-2294CRITICALKubio AI Page Builder <= 2.5.1 - Unauthenticated Local File InclusionEPSS 78.4%CVE-2021-39312HIGHTrue Ranker <= 2.2.2 Directory Traversal/Arbitrary File ReadEPSS 77.9%CVE-2022-2560HIGHThis vulnerability allows remote attackers to delete arbitrary files on affected installations of EnterpriseDT CompleteFTP 22.1.0 Server. AuEPSS 77.7%CVE-2024-55947HIGHGogs has a Path Traversal in file update APIEPSS 77.7%