CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-GFG9-5357-HV4C

GHSA-GFG9-5357-HV4C: Local File Read via Unsandboxed Audio Embedding in OpenClaw Gateway

Amit Schendel
Amit Schendel
Senior Security Researcher

Apr 29, 2026·7 min read·29 visits

Executive Summary (TL;DR)

OpenClaw versions before 2026.4.15 are vulnerable to a Local File Read flaw in the gateway component. Missing path containment checks in the audio embedding logic allow attackers to read arbitrary files from the filesystem by supplying crafted media URLs.

The OpenClaw gateway component prior to version 2026.4.15 contains a Local File Read (LFR) vulnerability due to improper restriction of pathnames to authorized directories. The flaw resides in the webchat audio embedding functionality, which fails to restrict local file resolution to a trusted sandbox directory. An attacker who can influence the media URL of an agent reply can extract arbitrary local files that bypass extension and size filters, exposing sensitive data to the web interface.

Vulnerability Overview

The OpenClaw gateway acts as the primary intermediary for processing agent replies and handling media assets requested by the webchat interface. A core feature of this component is the ability to embed audio files directly into webchat responses. When an agent or command reply references a media asset, the gateway resolves the provided file path, reads the file from the local disk, and base64-encodes the content for inline transmission to the client.

This architecture introduces a significant attack surface if the underlying path resolution logic is flawed. The vulnerability, tracked as GHSA-GFG9-5357-HV4C, manifests as an Improper Limitation of a Pathname to a Restricted Directory (CWE-22). The specific failure occurs because the gateway attempts to process absolute paths and file:// URIs without verifying that the resolved path resides within an explicitly authorized media root directory.

By leveraging this flaw, an attacker can manipulate the application into accessing files outside the intended operational scope. The application retrieves the targeted file, processes it through the standard base64 encoding pipeline, and delivers the encoded data directly to the webchat interface. This mechanism provides a direct exfiltration vector for local system data, constrained only by internal file size limits and extension verification checks.

Root Cause Analysis

The vulnerability originates in the src/gateway/server-methods/chat-webchat-media.ts file, specifically within the resolveLocalAudioFileForEmbedding function and its associated helper resolveLocalMediaPathForEmbedding. The root cause is the reliance on unconstrained path resolution functions combined with the absence of directory traversal prevention measures.

When a mediaUrl payload is received, the code utilizes the Node.js path.resolve() method to convert the input into an absolute path. Node.js path.resolve() normalizes paths and resolves directory traversals (../), but it does not intrinsically restrict the resulting absolute path to a specific base directory. Following resolution, the application enforces two checks: an extension check to ensure the file ends with a supported audio format (e.g., .mp3, .wav) and a size check against MAX_WEBCHAT_AUDIO_BYTES.

The critical missing component is a containment boundary check. The application fails to verify whether the final resolved path is a child of the configured media storage directory. Consequently, supplying an absolute path like /tmp/outside/sensitive_data.mp3 or a traversal payload like ../../../../var/lib/data.mp3 bypasses the intended directory restrictions. The application blindly trusts the resolved path as long as it satisfies the extension and size criteria.

Code Analysis

An analysis of commit 6e58f1f9f54bca1fea1268ec0ee4c01a2af03dde details the transition from the vulnerable implementation to the secure, patched logic. The vulnerable code executed path resolution synchronously and relied entirely on superficial checks without validating the filesystem boundary.

The patch introduces a robust containment model utilizing a new security primitive: assertLocalMediaAllowed(). This function is responsible for ensuring that the resolved absolute path is strictly a descendant of the configured localRoots. If the path escapes these boundaries, the assertion fails, and the read operation is terminated immediately.

// Conceptual representation of the fix in chat-webchat-media.ts
 
// BEFORE PATCH (Vulnerable)
export function resolveLocalAudioFileForEmbedding(mediaUrl: string) {
  const resolved = path.resolve(mediaUrl);
  if (!isValidAudioExtension(resolved)) return null;
  if (getFileSize(resolved) > MAX_WEBCHAT_AUDIO_BYTES) return null;
  return encodeToBase64(resolved);
}
 
// AFTER PATCH (Secure)
export async function resolveLocalAudioFileForEmbedding(mediaUrl: string, options: MediaOptions) {
  const resolved = path.resolve(mediaUrl);
  
  // Security Boundary Check Added
  assertLocalMediaAllowed(resolved, options?.localRoots);
  
  if (!isValidAudioExtension(resolved)) return null;
  if (getFileSize(resolved) > MAX_WEBCHAT_AUDIO_BYTES) return null;
  return encodeToBase64(resolved);
}

Furthermore, the patch implements getAgentScopedMediaLocalRoots. This ensures that directory access restrictions are applied per-agent, providing defense-in-depth. If one agent is compromised or manipulated, it cannot access media assets explicitly restricted to another agent's workspace. The transition to an asynchronous architecture was necessary to support these enhanced validation routines, as checking agent scopes requires asynchronous context resolution.

Exploitation Methodology

Exploiting this vulnerability requires the attacker to fulfill specific prerequisites. The attacker must possess the ability to inject or modify the mediaUrl field within an agent reply or command payload. The system processes this payload and triggers the vulnerable resolveLocalAudioFileForEmbedding routine.

The primary hurdle for exploitation is the extension check. The application verifies that the target file ends with an accepted audio extension. An attacker cannot read generic system files like /etc/passwd directly unless they can control the filename or manipulate the environment to append the required extension. Attackers often bypass this restriction by exploiting predictable temporary file patterns, symlinks, or by renaming sensitive files prior to extraction if they have limited write access.

The official test suite provides an operational Proof-of-Concept for the exploit mechanics. By defining a mediaUrl pointing to an absolute path outside the intended directory, the test confirms that the application previously embedded the file contents.

// Test suite PoC demonstrating the vulnerability context
it("rejects a local audio file outside configured localRoots", async () => {
    const allowedRoot = "/tmp/allowed";
    const outsideRoot = "/tmp/outside";
    // Attacker crafts a path outside the permitted directory boundary
    const audioPath = "/tmp/outside/sensitive_data.mp3";
    
    const blocks = await buildWebchatAudioContentBlocksFromReplyPayloads(
      [{ mediaUrl: audioPath }],
      { localRoots: [allowedRoot] }
    );
 
    // In vulnerable versions, blocks contained the base64 encoded data.
    // The patched version correctly returns 0 blocks.
    expect(blocks).toHaveLength(0);
});

Impact Assessment

The vulnerability constitutes an information disclosure vector via Local File Read (LFR). When exploitation is successful, the targeted file is read into memory, base64-encoded, and delivered to the webchat client. This encoding guarantees the clean exfiltration of both binary and text data without interference from string processing routines or network firewalls.

The impact severity is bounded by the file extension and size constraints. The requirement for specific extensions (.mp3, .wav, etc.) prevents untargeted, opportunistic reading of arbitrary configuration files unless the attacker has secondary mechanisms to manipulate the file system. The size constraint (MAX_WEBCHAT_AUDIO_BYTES) further restricts the volume of data that can be exfiltrated in a single transaction, mitigating the risk of memory exhaustion or large-scale database theft.

Despite these mitigating factors, the vulnerability poses a substantial security risk in multi-tenant or shared environments. If an attacker can stage a file with the correct extension, or if sensitive application data naturally shares those extensions or is placed in predictably named temporary locations, confidentiality is broken. The CVSS score reflects this conditional impact, classifying the vulnerability as Medium severity.

Remediation and Mitigation

The definitive remediation for this vulnerability is updating OpenClaw to version 2026.4.15 or later. The patch deployed in commit 6e58f1f9f54bca1fea1268ec0ee4c01a2af03dde fundamentally resolves the issue by enforcing directory containment prior to any file read operations.

For environments where immediate patching is not feasible, administrators should enforce strict file system permissions on the host system. The user account executing the OpenClaw Node.js process must be granted the minimum necessary read privileges, restricted exclusively to the intended application directories. This limits the blast radius of the LFR, ensuring that even if path traversal occurs, the operating system blocks access to sensitive global files.

Developers integrating OpenClaw should additionally review their localRoots configuration. The localRoots array should be as narrow as possible, avoiding root directory / or broad parent directories /tmp. Implementing getAgentScopedMediaLocalRoots is strongly advised to enforce strict tenant isolation, preventing lateral data exposure across different agents operating within the same OpenClaw instance.

Official Patches

OpenClawOfficial patch commit implementing path confinement

Fix Analysis (1)

Technical Appendix

CVSS Score
6.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Affected Systems

OpenClaw Gateway ComponentOpenClaw Webchat InterfaceNode.js Environment

Affected Versions Detail

Product
Affected Versions
Fixed Version
OpenClaw
OpenClaw
< 2026.4.152026.4.15
AttributeDetail
CWE IDCWE-22
Attack VectorNetwork
ImpactInformation Disclosure (Local File Read)
Exploit StatusProof of Concept
CVSS Score6.5
Fixed Version2026.4.15

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1212Exploitation for Credential Access
Credential Access
CWE-22
Improper Limitation of a Pathname to a Restricted Directory

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Vulnerability Timeline

Patch Released in version 2026.4.15
2026-04-15
Public Disclosure via GHSA-GFG9-5357-HV4C
2026-04-16

References & Sources

  • [1]GitHub Advisory: GHSA-GFG9-5357-HV4C
  • [2]OpenClaw Fix Commit
  • [3]Community Tracker
  • [4]Aliyun Vulnerability Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•7 minutes ago•CVE-2026-86046
7.1

CVE-2026-86046: Arbitrary File Write via Path Traversal in termux-sync Restore Workflow

A path traversal vulnerability (CWE-22) in termux-sync prior to version 1.2.4 allows an attacker to overwrite arbitrary files within the Termux environment during the backup restoration process. The flaw stems from the application trusting attacker-controlled extraction paths defined in the backup's manifest.json file, failing to validate archive members against directory traversal sequences during tar extraction, and using unsanitized backup names when constructing temporary directories. If a user restores a malicious backup archive from local storage, shared folders, GitHub, or Google Drive, an attacker can overwrite sensitive configuration files such as shell startup scripts or local binaries, resulting in arbitrary code execution under the privileges of the Termux user.

Amit Schendel
Amit Schendel
0 views•11 min read
•about 1 hour ago•CVE-2026-129296
6.5

CVE-2026-129296: Path Traversal in SpamScope mail-parser Attachment Extraction

SpamScope mail-parser versions 3.8.0 prior to 4.6.0 contain a path traversal vulnerability (CWE-22) within the write_attachments() and write_sample() functions. The library passes untrusted attachment filenames directly into os.path.join() without stripping directory components, validating path containment, or verifying symbolic links. An attacker can send a crafted email containing relative path traversal sequences or absolute filesystem paths in the Content-Disposition header to write or overwrite arbitrary files accessible to the parsing process.

Amit Schendel
Amit Schendel
2 views•9 min read
•about 2 hours ago•CVE-2026-129295
7.5

CVE-2026-129295: Polynomial Regular Expression Denial of Service (ReDoS) in SpamScope mail-parser

A Regular Expression Denial of Service (ReDoS) vulnerability exists in SpamScope mail-parser versions 4.2.0 prior to 4.6.1. Two separate regular expressions evaluated during standard email header parsing exhibit quadratic to cubic backtracking complexity when processing headers padded with whitespace or angle brackets. An unauthenticated remote attacker can exploit this flaw by sending a small, RFC-compliant email message, causing parsing worker threads or processes to stall at 100% CPU utilization for extended periods.

Amit Schendel
Amit Schendel
2 views•10 min read
•about 3 hours ago•CVE-2026-129297
7.5

CVE-2026-129297: Sender IP Address Spoofing in SpamScope mail-parser

CVE-2026-129297 is an origin validation vulnerability (CWE-345) in the Python library mail-parser prior to version 4.6.2. The MailParser.get_server_ipaddress() method fails to properly isolate MTA-recorded client IP addresses from sender-controlled text within email Received headers. Due to naive substring delimiter matching, appearance-based regular expression scanning, and fail-open header traversal, remote attackers can spoof their originating IP address to bypass email security controls, blocklists, and anti-spam attribution.

Amit Schendel
Amit Schendel
2 views•11 min read
•about 4 hours ago•CVE-2026-129299
6.5

CVE-2026-129299: Uncaught Exceptions and Silent Header Loss via Reflective Attribute Dispatch in SpamScope mail-parser

CVE-2026-129299 (GHSA-24mq-4vc6-2prf) is a parsing and serialization flaw in SpamScope mail-parser prior to version 4.6.2. The library uses reflective Python attribute resolution (getattr) over untrusted email header names and applies caller convenience transformations (such as underscore-to-hyphen folding and _json/_raw suffix stripping) directly to wire headers. An unauthenticated remote attacker can send crafted emails that trigger uncaught TypeError exceptions during JSON serialization or cause security-relevant headers and body content to be silently dropped without setting defect indicators.

Amit Schendel
Amit Schendel
3 views•11 min read
•about 5 hours ago•CVE-2026-129236
7.2

CVE-2026-129236: Command-Line Argument Injection in Kubeshark MCP Server

CVE-2026-129236 is a command-line argument injection vulnerability (CWE-88) in Kubeshark, an eBPF-based network observability tool for Kubernetes. Located within the Model Context Protocol (MCP) server implementation in cmd/mcpRunner.go, the flaw occurs when handling the start_kubeshark tool request. When the MCP server runs with the --allow-destructive flag, the callStartKubeshark function appends the caller-supplied pod_regex parameter directly to the kubeshark tap argument slice without an end-of-options (--) delimiter. Because Kubeshark uses the Cobra and pflag libraries for command-line parsing, any pod_regex value prefixed with a hyphen is interpreted as a CLI flag rather than a positional regular expression. An attacker capable of influencing MCP tool arguments, such as through indirect prompt injection against a connected Large Language Model (LLM) agent, can inject the --set flag to override Helm chart values like tap.docker.registry. Because Kubeshark deploys its worker DaemonSet with privileged security contexts and host networking enabled, redirecting the container image registry allows arbitrary code execution as root across all Kubernetes cluster nodes.

Alon Barad
Alon Barad
6 views•11 min read