CVE-2026-25475: OpenClaw Local File Inclusion Vulnerability
Summary
CVE-2026-25475: OpenClaw Vulnerable to Local File Inclusion via MEDIA: Path Extraction. Affects openclaw versions < 2026.1.30. Fixed in 2026.1.30. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
OpenClaw is an open-source media management tool designed to facilitate the handling and sharing of media files. It allows users to upload, manage, and share various media formats seamlessly. However, a critical vulnerability has been identified in its media parsing functionality, which could allow unauthorized access to sensitive files on the server.
Vulnerability Detail
The vulnerability arises from the 'isValidMedia()' function located in 'src/media/parse.ts'. This function inadequately validates file paths, permitting arbitrary file access through absolute paths, home directory paths, and directory traversal sequences. An attacker can exploit this flaw by providing malicious input such as 'MEDIA:/etc/passwd' or 'MEDIA:~/.ssh/id_rsa', leading to the potential exposure of sensitive information including SSH keys, cloud credentials, and system files. The lack of proper path validation poses a significant risk, allowing attackers to read any file accessible to the agent user.
How To Fix
Latest published version: 2026.10.6 as of 22 Oct 2026
npm install openclaw@2026.10.6
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
2026.1.30
This is the first release that contains the fix.
npm install openclaw@2026.1.30
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you can implement stricter validation for file paths in your application. For example, modify the 'isValidMedia()' function to restrict access to a specific directory or only allow certain file types. Here’s an example of a more secure validation function:
function isValidMedia(candidate: string, opts?: { allowSpaces?: boolean }) {
const safeDirectory = '/path/to/media/files';
const resolvedPath = path.resolve(safeDirectory, candidate);
return resolvedPath.startsWith(safeDirectory);
}
Conclusion
The OpenClaw vulnerability CVE-2026-25475 poses a significant risk due to its potential for local file inclusion. It is crucial for users to update to the patched version 2026.1.30 to mitigate this risk. Additionally, implementing stricter validation measures can help safeguard against similar vulnerabilities in the future.
See every vulnerability recorded for openclaw →
FAQ
The vulnerability allows local file inclusion, enabling attackers to read sensitive files on the server.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without any signup.
Exploitation of this vulnerability can lead to unauthorized access to sensitive data such as SSH keys, cloud credentials, and system files.
Yes, a patch is available in version 2026.1.30 of OpenClaw. It is recommended to update to this version.
The CVSS score of this vulnerability is 6.5, indicating a moderate severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for openclaw.