Weaknesses of type CWE-22

6,564 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-46253CRITICALRemote code execution in SquidexEPSS 1.9%CVE-2021-22748—A CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability exists that could allow a remote codeEPSS 1.9%CVE-2024-37728HIGHArbitrary File Read vulnerability in Xi'an Daxi Information Technology Co., Ltd OfficeWeb365 v.7.18.23.0 and v8.6.1.0 allows a remote attackEPSS 1.9%CVE-2026-9776HIGHATEN Unizon writeFileToHttpServletResponse Directory Traversal Information Disclosure VulnerabilityEPSS 1.9%CVE-2022-41956MEDIUMAutolab is vulnerable to file disclosure via remote handin featureEPSS 1.8%CVE-2026-2033HIGHMLflow Tracking Server Artifact Handler Directory Traversal Remote Code Execution VulnerabilityEPSS 1.8%CVE-2025-63414CRITICALA Path Traversal vulnerability in the Allsky WebUI version v2024.12.06_06 allows an unauthenticated remote attacker to achieve arbitrary comEPSS 1.8%CVE-2024-56331MEDIUMLocal File Inclusion (LFI) via Improper URL Handling in uptime-kuma's `Real-Browser` monitorEPSS 1.8%CVE-2022-22128CRITICALTableau discovered a path traversal vulnerability affecting Tableau Server Administration Agent’s internal file transfer service that could EPSS 1.8%CVE-2022-39033CRITICALSmart eVision - Path Traversal -1EPSS 1.8%CVE-2023-51645HIGHAllegra unzipFile Directory Traversal Remote Code Execution VulnerabilityEPSS 1.8%CVE-2022-21682HIGHflatpak-builder can access files outside the build directory.EPSS 1.8%CVE-2023-51646HIGHAllegra uploadSimpleFile Directory Traversal Remote Code Execution VulnerabilityEPSS 1.8%CVE-2023-51640HIGHAllegra extarctZippedFile Directory Traversal Remote Code Execution VulnerabilityEPSS 1.8%CVE-2021-22857HIGHChanGate EnterPrise Co., Ltd property management system - Directory TraversalEPSS 1.8%CVE-2017-15893—Directory traversal vulnerability in the SYNO.FileStation.Extract in Synology File Station before 1.1.1-0099 allows remote authenticated useEPSS 1.8%CVE-2018-5445—A Path Traversal issue was discovered in Advantech WebAccess/SCADA versions prior to V8.2_20170817. An attacker has read access to files witEPSS 1.8%CVE-2026-5487HIGHDriveLock Directory Traversal Information Disclosure VulnerabilityEPSS 1.8%CVE-2026-5491HIGHDriveLock Directory Traversal Information Disclosure VulnerabilityEPSS 1.8%CVE-2022-31483CRITICALArbitrary file write via authenticated OSDP file uploadEPSS 1.8%