Falhas do tipo CWE-22

5.826 resultados

Travessia de diretório (Path Traversal)

A aplicação constrói caminhos de arquivo usando entrada do usuário sem validar adequadamente, permitindo que caracteres especiais como '../' façam o caminho "sair" do diretório permitido e acessar arquivos fora da zona restrita. Isso expõe dados sensíveis ou permite manipulação de arquivos críticos do sistema.

Exemplo

Um site permite download de documentos via URL como /download?file=relatorio.pdf, mas não valida o parâmetro. Um atacante usa /download?file=../../etc/passwd para ler o arquivo de senhas do servidor, ou /download?file=../../configuracao.db para acessar a base de dados da aplicação.

Como mitigar

Valide e normalize todos os caminhos de entrada (use funções nativas como realpath ou canonicalize), implemente uma whitelist de arquivos permitidos em vez de bloquear padrões perigosos, e configure permissões de arquivo restritivas no SO. Melhor ainda: nunca construa caminhos a partir de entrada do usuário — use índices ou IDs mapeados internamente.

CVE-2024-23652CRITICALBuildKit possible host system access from mount stub cleanerEPSS 2.1%CVE-2025-41242MEDIUMCVE-2025-41242: Path traversal vulnerability on non-compliant Servlet containersEPSS 2.1%CVE-2007-3967HIGHDirectory traversal vulnerability in index.php in PHP Directory Lister (dirLIST) before 0.1.1 allows remote attackers to list the contents oEPSS 2.1%CVE-2023-29159HIGHDirectory traversal vulnerability in Starlette versions 0.13.5 and later and prior to 0.27.0 allows a remote unauthenticated attacker to vieEPSS 2.0%CVE-2023-40509HIGHLG Simple Editor deleteCanvas Directory Traversal Arbitrary File Deletion VulnerabilityEPSS 2.0%CVE-2023-40499HIGHLG Simple Editor mkdir Directory Traversal Arbitrary File Deletion VulnerabilityEPSS 2.0%CVE-2023-40508HIGHLG Simple Editor putCanvasDB Directory Traversal Arbitrary File Deletion VulnerabilityEPSS 2.0%CVE-2020-15229HIGHPath traversal and files overwrite with unsquashfsEPSS 2.0%CVE-2019-16777HIGHArbitrary File Overwrite in npm CLIEPSS 2.0%CVE-2025-25163HIGHWordPress Plugin A/B Image Optimizer Plugin <= 3.3 - Arbitrary File Download vulnerabilityEPSS 2.0%CVE-2018-3731—public node module suffers from a Path Traversal vulnerability due to lack of validation of filePath, which allows a malicious user to read EPSS 2.0%CVE-2018-3730—mcstatic node module suffers from a Path Traversal vulnerability due to lack of validation of filePath, which allows a malicious user to reaEPSS 2.0%CVE-2018-3787—Path traversal in simplehttpserver <v0.2.1 allows listing any file on the server.EPSS 2.0%CVE-2018-3725—hekto node module suffers from a Path Traversal vulnerability due to lack of validation of file, which allows a malicious user to read conteEPSS 2.0%CVE-2018-3727—626 node module suffers from a Path Traversal vulnerability due to lack of validation of file, which allows a malicious user to read contentEPSS 2.0%CVE-2022-24840CRITICALImproper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in django-s3fileEPSS 2.0%CVE-2022-44006CRITICALAn issue was discovered in BACKCLICK Professional 5.9.63. Due to improper validation or sanitization of upload filenames, an externally reacEPSS 2.0%CVE-2024-24398CRITICALDirectory Traversal vulnerability in Stimulsoft GmbH Stimulsoft Dashboard.JS before v.2024.1.2 allows a remote attacker to execute arbitraryEPSS 2.0%CVE-2023-28413CRITICALDirectory traversal vulnerability in Snow Monkey Forms versions v5.0.6 and earlier allows a remote unauthenticated attacker to obtain sensitEPSS 2.0%CVE-2018-3729—localhost-now node module suffers from a Path Traversal vulnerability due to lack of validation of file, which allows a malicious user to reEPSS 2.0%