Weaknesses of type CWE-22

5,840 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-2026-36723HIGHAn unrestricted file rename vulnerability in the /api/create-user component of bookcars v8.3 allows authenticated attackers to leverage direEPSS 1.4%CVE-2019-3902MEDIUMA flaw was found in Mercurial before 4.9. It was possible to use symlinks and subrepositories to defeat Mercurial's path-checking logic and EPSS 1.4%CVE-2025-6794CRITICALMarvell QConvergeConsole saveAsText Directory Traversal Remote Code Execution VulnerabilityEPSS 1.4%CVE-2021-33354HIGHDirectory Traversal vulnerability in htmly before 2.8.1 allows remote attackers to perform arbitrary file deletions via modified file parameEPSS 1.4%CVE-2025-66262CRITICALArbitrary File Overwrite via Tar Extraction Path TraversalEPSS 1.4%CVE-2022-34271HIGHApache Atlas: zip path traversal in import functionalityEPSS 1.4%CVE-2021-21907MEDIUMA directory traversal vulnerability exists in the CMA CLI getenv command functionality of Garrett Metal Detectors’ iC Module CMA Version 5.0EPSS 1.4%CVE-2024-40617MEDIUMPath traversal vulnerability exists in FUJITSU Network Edgiot GW1500 (M2M-GW for FENICS). If a remote authenticated attacker with User ClassEPSS 1.4%CVE-2021-41185HIGHDownload file outside intended directoryEPSS 1.4%CVE-2025-47492HIGHWordPress Drag and Drop File Upload for Elementor Forms plugin <= 1.4.3 - Arbitrary File Deletion VulnerabilityEPSS 1.4%CVE-2025-27782HIGHApplio allows arbitrary file write in inference.pyEPSS 1.4%CVE-2024-7924MEDIUMZZCMS list.php path traversalEPSS 1.4%CVE-2018-3715—glance node module before 3.0.4 suffers from a Path Traversal vulnerability due to lack of validation of path passed to it, which allows a mEPSS 1.4%CVE-2019-25687CRITICALPegasus CMS 1.0 Remote Code Execution via extra_fields.phpEPSS 1.4%CVE-2022-46137HIGHAeroCMS v0.0.1 is vulnerable to Directory Traversal. The impact is: obtain sensitive information (remote). The component is: AeroCMS v0.0.1.EPSS 1.4%CVE-2022-45381HIGHJenkins Pipeline Utility Steps Plugin 2.13.1 and earlier does not restrict the set of enabled prefix interpolators and bundles versions of AEPSS 1.4%CVE-2026-59866CRITICALKiota: Arbitrary file write + code-injection via x-ms-kiota-info clientClassName and clientNamespaceNameEPSS 1.4%CVE-2022-39345CRITICALGin-vue-admin arbitrary file upload vulnerability caused by path traversalEPSS 1.4%CVE-2022-48285HIGHloadAsync in JSZip before 3.8.0 allows Directory Traversal via a crafted ZIP archive.EPSS 1.4%CVE-2023-24960HIGHIBM InfoSphere Information Server information disclosureEPSS 1.4%