Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. ep_etherpad-lite
  4. ›
  5. CVE-2026-55086

CVE-2026-55086: ep_etherpad-lite: Import/export uses Math.random() for temp file paths; predictable paths on shared /tmp enable symlink-based file overwrite

August 13, 2026

src/node/handler/ImportHandler.ts and src/node/handler/ExportHandler.ts both compute their temporary working-file paths as:

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).

References

  • github.com/advisories/GHSA-2jwf-f4xq-f24h
  • github.com/ether/etherpad/commit/8c6104c5d5daf41f0d454acc04d42dffa0e0d996
  • github.com/ether/etherpad/pull/7784
  • github.com/ether/etherpad/security/advisories/GHSA-2jwf-f4xq-f24h
  • nvd.nist.gov/vuln/detail/CVE-2026-55086

Code Behaviors & Features

Detect and mitigate CVE-2026-55086 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.1.0

Fixed versions

  • 3.1.0

Solution

Upgrade to version 3.1.0 or above.

Impact 4.2 MEDIUM

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-377: Insecure Temporary File
  • CWE-59: Improper Link Resolution Before File Access ('Link Following')

Source file

npm/ep_etherpad-lite/CVE-2026-55086.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 14 Aug 2026 12:19:38 +0000.