GHSA-RXWP-Q2QG-98VW
veans init follows repo symlinks when writing files
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-RXWP-Q2QG-98VW divulgada · CVSS 3.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Affects all veans versions (veans has no tagged release yet).
## Summary
A hostile repo ships symlinks so that `veans init` writes outside the repo. The attacker can't control the content, so the result is file destruction or a stray global hook, not code execution. Three variants:
- `.veans.yml` → `~/.bashrc`: the target is overwritten on "y"; a dangling link's target is created with no prompt.
- `.claude` → `~/.claude`: a hook is added to the global `settings.json`.
- `.opencode` → a global plugin is installed.
## Details
There is no `Lstat`, `O_NOFOLLOW` or `EvalSymlinks` in `veans/internal`. The writes are at `veans/internal/config/config.go:151-154` and `veans/internal/bootstrap/hooks.go:231-234,269-281`, and the overwrite check uses link-following `os.Stat` (`veans/internal/bootstrap/bootstrap.go:320`).
## Impact
Loss of a user file reachable via symlink, or veans hooks/plugins installed globally for every agent session. Requires the victim to run `veans init` in the hostile checkout.
## Fix
veans is on Go 1.27, so use `os.OpenRoot(repoRoot)` once and route writes through `root.MkdirAll`/`root.WriteFile` with repo-relative paths. Route the preceding reads through it too: the `settings.json` merge read, and `os.Stat` → `root.Lstat`. Test that outside targets error and stay untouched, and that an in-repo link still works. `credentials/file.go` (global XDG) is out of scope.
This is unrelated to the planned veans trust gate, because the user chose to run init in that repo.
_Found via internal security review (deep #34)._
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Gocode.vikunja.io/veans |
Sin parche | — | — | — |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/go-vikunja/vikunja/security/advisories/GHSA-rxwp-q2qg-98vwLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
