Weaknesses of type CWE-22

6,563 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-2021-23043—On BIG-IP, on all versions of 16.1.x, 16.0.x, 15.1.x, 14.1.x, 13.1.x, 12.1.x, and 11.6.x, a directory traversal vulnerability exists in an uEPSS 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%CVE-2022-0320—Essential Addons for Elementor < 5.0.5 - Unauthenticated LFIEPSS 2.0%CVE-2025-34120HIGHLimeSurvey 2.0+ - 2.06+ Unauthenticated Arbitrary File Download via Serialized Backup PayloadEPSS 2.0%CVE-2017-12074—Directory traversal vulnerability in the SYNO.DNSServer.Zone.MasterZoneConf in Synology DNS Server before 2.2.1-3042 allows remote authenticEPSS 2.0%CVE-2020-8214—A path traversal vulnerability in servey version < 3 allows an attacker to read content of any arbitrary file.EPSS 2.0%CVE-2023-5212CRITICALAI ChatBot <= 4.8.9 and 4.9.2- Authenticated (Subscriber+) Arbitrary File Deletion via qcld_openai_delete_training_fileEPSS 2.0%CVE-2020-3241MEDIUMCisco UCS Director Path Traversal VulnerabilityEPSS 2.0%CVE-2019-18253—An attacker could use specially crafted paths in a specific request to read or delete files from Relion 670 Series (versions 1p1r26, 1.2.3.1EPSS 2.0%CVE-2023-50785LOWZoho ManageEngine ADAudit Plus before 7270 allows admin users to view names of arbitrary directories via path traversal.EPSS 2.0%CVE-2017-16160—11xiaoli is a simple file server. 11xiaoli is vulnerable to a directory traversal issue, giving an attacker access to the filesystem by placEPSS 2.0%CVE-2017-16090—fsk-server is a simple http server. fsk-server is vulnerable to a directory traversal issue, giving an attacker access to the filesystem by EPSS 2.0%CVE-2017-16170—liuyaserver is a static file server. liuyaserver is vulnerable to a directory traversal issue, giving an attacker access to the filesystem bEPSS 2.0%CVE-2017-16140—lab6.brit95 is a file server. lab6.brit95 is vulnerable to a directory traversal issue, giving an attacker access to the filesystem by placiEPSS 2.0%CVE-2017-16130—exxxxxxxxxxx is an Http eX Frame Google Style JavaScript Guide. exxxxxxxxxxx is vulnerable to a directory traversal issue, giving an attackeEPSS 2.0%CVE-2017-16187—open-device creates a web interface for any device. open-device is vulnerable to a directory traversal issue, giving an attacker access to tEPSS 2.0%CVE-2017-16210—jn_jj_server is a static file server. jn_jj_server is vulnerable to a directory traversal issue, giving an attacker access to the filesystemEPSS 2.0%CVE-2017-16196—quickserver is a simple static file server. quickserver is vulnerable to a directory traversal issue, giving an attacker access to the filesEPSS 2.0%CVE-2017-16221—yzt is a simple file server. yzt is vulnerable to a directory traversal issue, giving an attacker access to the filesystem by placing "../" EPSS 2.0%CVE-2017-16215—sgqserve is a simple file server. sgqserve is vulnerable to a directory traversal issue, giving an attacker access to the filesystem by placEPSS 2.0%