Weaknesses of type CWE-22

5,824 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-2020-8222A path traversal vulnerability exists in Pulse Connect Secure <9.1R8 that allowed an authenticated attacker via the administrator web interfEPSS 2.3%CVE-2020-8221A path traversal vulnerability exists in Pulse Connect Secure <9.1R8 which allows an authenticated attacker to read arbitrary files via the EPSS 2.3%CVE-2024-51483MEDIUMchangedetection.io Path Traversal vulnerabilityEPSS 2.3%CVE-2022-1992CRITICALPath Traversal in gogs/gogsEPSS 2.3%CVE-2022-1560Amministrazione Aperta < 3.8 - Admin+ LFIEPSS 2.3%CVE-2017-16604This vulnerability allows remote attackers to overwrite arbitrary files on vulnerable installations of NetGain Systems Enterprise Manager 7.EPSS 2.3%CVE-2017-16601This vulnerability allows remote attackers to overwrite arbitrary files on vulnerable installations of NetGain Systems Enterprise Manager 7.EPSS 2.3%CVE-2021-38360HIGHwp-publications <= 0.0 Local File IncludeEPSS 2.3%CVE-2020-14523HIGHMitsubishi Electric Factory Automation Products Path TraversalEPSS 2.3%CVE-2019-9886CRITICALeClass platform allows user to download arbitrary files without authenticationEPSS 2.2%CVE-2022-1721HIGHPath Traversal in WellKnownServlet in jgraph/drawioEPSS 2.2%CVE-2024-54382MEDIUMWordPress Bold Page Builder plugin <= 5.1.5 - Path Traversal vulnerabilityEPSS 2.2%CVE-2026-9777HIGHATEN Unizon restoreDB Directory Traversal Remote Code Execution VulnerabilityEPSS 2.2%CVE-2026-9778HIGHATEN Unizon ImportDeviceList Directory Traversal Remote Code Execution VulnerabilityEPSS 2.2%CVE-2021-34436In Eclipse Theia 0.1.1 to 0.2.0, it is possible to exploit the default build to obtain remote code execution (and XXE) via the theia-xml-extEPSS 2.2%CVE-2021-22794CRITICALA CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability exists that could cause remote code exEPSS 2.2%CVE-2024-12905HIGHAn Improper Link Resolution Before File Access ("Link Following") and Improper Limitation of a Pathname to a Restricted Directory ("Path TraEPSS 2.2%CVE-2018-3733crud-file-server node module before 0.9.0 suffers from a Path Traversal vulnerability due to incorrect validation of url, which allows a malEPSS 2.2%CVE-2022-34254HIGHAdobe Commerce Improper Limitation of a Pathname to a Restricted Directory Arbitrary code executionEPSS 2.2%CVE-2022-26675HIGHaEnrich a+HRD - Path TraversalEPSS 2.2%