mediumCVSS 4.2Vulnerability

CVE-2026-55086

## Description `src/node/handler/ImportHandler.ts` and `src/node/handler/ExportHandler.ts` both compute their temporary working-file paths as: ```ts const randNum = Math.floor(Math.random() * 0xFFFFFFFF); const srcFile = `${os.tmpdir()}/etherpad_export_${randNum}.html`; const destFile = `${os.tmpdir()}/etherpad_export_${randNum}.${type}`; ``` Two flaws compound: 1. **`Math.random()` is not crypto-secure.** It yields at most ~32 bits of entropy and is **predictable across calls within the same Node process** (V8 shares PRNG state between consecutive `Math.random()` invocations). An attacker on the same host who observes any earlier temp-file name from logs or other side channels can predict subsequent names. 2. **The paths land in `os.tmpdir()`.** On a typical Linux system this is `/tmp` — a shared world-writable directory. An unprivileged local attacker can pre-create a symbolic link at a predicted path pointing at any file the Etherpad process can write: ``` ln -s /etc/etherpad/SESSIONKEY.txt /tmp/etherpad_export_<predicted>.html ``` When `ExportHandler` calls `fs.writeFile(srcFile, html)` (or `ImportHandler` calls `fs.rename(srcFile, destFile)` / `soffice` writes its converted output to the path), the open syscall follows the symlink and either reads from or overwrites the linked target. For deployments where the Etherpad process runs as a privileged user (notably some Docker base images that run as root, snap confinement edge cases, or hand-rolled systemd units), this becomes arbitrary file overwrite. The Import path is more impactful in practice: the file content the attacker can land in the symlink target is partially attacker-controlled (the post-soffice/post-mammoth conversion output of the uploaded document). ## Severity rationale - **AV:L** — requires local access to the host that runs Etherpad. Multi-tenant hosts (shared dev boxes, k8s shared-node setups, single-server CI workers) are the realistic threat surface. - **AC:H** — attacke

Properties

ghsa_id
GHSA-2jwf-f4xq-f24h
severity
medium
summary
ep_etherpad-lite: Import/export uses Math.random() for temp file paths; predictable paths on shared /tmp enable symlink-based file overwrite
cvss_score
4.2
cve_id
CVE-2026-55086
cvss_vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N
is_ghsa_only
false
ghsa_published
2026-08-13T14:11:07Z
source_url
https://github.com/advisories/GHSA-2jwf-f4xq-f24h
ghsa_updated
2026-08-13T14:11:08Z

Related Entities (5)

VULNERABLE_TO (1)

[Software]npm/ep_etherpad-lite

AFFECTS (1)

[Software]npm/ep_etherpad-lite

HAS_WEAKNESS (2)

[Weakness]Improper Link Resolution Before File Access ('Link Following')
[Weakness]Insecure Temporary File

REPORTED_BY (1)

[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-55086 (CVSS 4.2) — Ninja Signal Threat Intelligence | Ninja Signal