CVE-2026-25475
JSON

6.5medium

OpenClaw Vulnerable to Local File Inclusion via MEDIA: Path Extraction

Severity
6.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.83% (higher than 58% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-r8g4-86fx-92mq

Description

OpenClaw is a personal AI assistant. Prior to version 2026.1.30, the isValidMedia() function in src/media/parse.ts allows arbitrary file paths including absolute paths, home directory paths, and directory traversal sequences. An agent can read any file on the system by outputting MEDIA:/path/to/file, exfiltrating sensitive data to the user/channel. This issue has been patched in version 2026.1.30.

Affected

Product or packageVersionsReported by
openclaw openclaw< 2026.1.30, before 2026.1.30CVE List, NVD
openclaw (npm)before 2026.1.30GitHub Advisory Database

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Classification

CWE-22CWE-200

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

OpenClaw is a personal AI assistant. Prior to version 2026.1.30, the isValidMedia() function in src/media/parse.ts allows arbitrary file paths including absolute paths, home directory paths, and directory traversal sequences. An agent can read any file on the system by outputting MEDIA:/path/to/file, exfiltrating sensitive data to the user/channel. This issue has been patched in version 2026.1.30.

GitHub Advisory Database
Summary

The isValidMedia() function in src/media/parse.ts allows arbitrary file paths including absolute paths, home directory paths, and directory traversal sequences. An agent can read any file on the system by outputting MEDIA:/path/to/file, exfiltrating sensitive data to the user/channel.

Details

Location: src/media/parse.ts:17-27

The path validation accepts dangerous patterns:

function isValidMedia(candidate: string, opts?: { allowSpaces?: boolean }) {
  if (candidate.startsWith("/")) return true;      // ALLOWS /etc/passwd
  if (candidate.startsWith("./")) return true;
  if (candidate.startsWith("../")) return true;    // ALLOWS ../../etc/passwd
  if (candidate.startsWith("~")) return true;      // ALLOWS ~/secrets
  return false;
}

No validation ensures the path is within a safe directory or is actually a media file.

PoC

Agent outputs any of:

MEDIA:/etc/passwd
MEDIA:~/.ssh/id_rsa
MEDIA:~/.aws/credentials
MEDIA:../../../etc/passwd

The file contents are rendered/sent to the requesting user or channel.

Impact
  • Read ANY file accessible to the agent user
  • Exfiltrate SSH keys (~/.ssh/id_rsa)
  • Steal cloud credentials (~/.aws/credentials)
  • Access API keys (.env, config.json)
  • Read system files (/etc/passwd, /etc/shadow)

Note: PR #4930 contains a fix but is NOT MERGED - production is vulnerable.

NVD (es)

OpenClaw es un asistente de IA personal. Antes de la versión 2026.1.30, la función isValidMedia() en src/media/parse.ts permite rutas de archivo arbitrarias, incluyendo rutas absolutas, rutas de directorio de inicio y secuencias de salto de directorio. Un agente puede leer cualquier archivo en el sistema al generar MEDIA:/path/to/file, exfiltrando datos sensibles al usuario/canal. Este problema ha sido parcheado en la versión 2026.1.30.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-25475 changed 2026-02-05CVE Terms of Use
GitHub Advisory DatabaseGHSA-r8g4-86fx-92mq changed 2026-02-04CC-BY-4.0
NVDCVE-2026-25475 changed 2026-06-17Public domain