Fallos del tipo CWE-61

173 resultados

Seguimento de ligações simbólicas em UNIX

Fraqueza onde uma aplicação segue uma ligação simbólica (symlink) sem validar adequadamente, permitindo que um atacante redirecione operações de arquivo para locais não intencionais. Um processo com privilégios elevados pode acabar lendo, escrevendo ou deletando arquivos críticos do sistema ao seguir um symlink malicioso criado pelo atacante.

Ejemplo

Um script de limpeza executado como root tenta remover arquivos em /tmp/cache sem verificar se são symlinks. Um atacante cria um symlink em /tmp/cache apontando para /etc/passwd, e o script acaba deletando a credencial do sistema. Ou um programa tenta criar um arquivo de log em /tmp sem checar se /tmp/app.log já é um symlink para /etc/shadow.

Cómo mitigar

Use funções seguras como open() com flags O_NOFOLLOW, lstat() em vez de stat(), ou valide o caminho com realpath() antes de operar. Em shell scripts, use [[ -L file ]] para detectar symlinks. Mantenha /tmp e /var/tmp com sticky bit (1777) e evite TOCTOU—verifique e acesse atomicamente ou use descritores de arquivo.

CVE-2024-45310LOWrunc can be confused to create empty files/directories on the hostEPSS 0.3%CVE-2026-57825MEDIUMIn the opam package before 2.5.2 for OCaml, the sandbox protection mechanism can be bypassed because symlinks are mishandled during use of .EPSS 0.3%CVE-2023-41969HIGHZSATrayManager Arbitrary File DeletionEPSS 0.3%CVE-2025-33225HIGHNVIDIA Resiliency Extension for Linux contains a vulnerability in log aggregation, where an attacker could cause predictable log-file names.EPSS 0.3%CVE-2021-32547HIGHapport read_file() function could follow maliciously constructed symbolic linksEPSS 0.3%CVE-2026-5223MEDIUMCrates in third party registries can override the cached source of other cratesEPSS 0.3%CVE-2021-32548HIGHapport read_file() function could follow maliciously constructed symbolic linksEPSS 0.3%CVE-2021-32549HIGHapport read_file() function could follow maliciously constructed symbolic linksEPSS 0.3%CVE-2021-32552HIGHapport read_file() function could follow maliciously constructed symbolic linksEPSS 0.3%CVE-2021-32554HIGHapport read_file() function could follow maliciously constructed symbolic linksEPSS 0.3%CVE-2021-32555HIGHapport read_file() function could follow maliciously constructed symbolic linksEPSS 0.3%CVE-2020-15075OpenVPN Connect installer for macOS version 3.2.6 and older may corrupt system critical files it should not have access via symlinks in /tmpEPSS 0.3%CVE-2021-32550HIGHapport read_file() function could follow maliciously constructed symbolic linksEPSS 0.3%CVE-2021-32551HIGHapport read_file() function could follow maliciously constructed symbolic linksEPSS 0.3%CVE-2025-43853HIGHiwasm vulnerable to filesystem sandbox escape with symlink when using uvwasi featureEPSS 0.3%CVE-2026-23986MEDIUMCopier safe template has arbitrary filesystem write access via directory symlinks when _preserve_symlinks: trueEPSS 0.3%CVE-2026-28684MEDIUMpython-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallbackEPSS 0.3%CVE-2025-66431HIGHWebPros Plesk before 18.0.73.5 and 18.0.74 before 18.0.74.2 on Linux allows remote authenticated users to execute arbitrary code as root viaEPSS 0.3%CVE-2024-27872MEDIUMThis issue was addressed with improved validation of symlinks. This issue is fixed in macOS Sonoma 14.6. An app may be able to access protecEPSS 0.3%CVE-2021-1612MEDIUMCisco IOS XE SD-WAN Software Arbitrary File Overwrite VulnerabilityEPSS 0.3%