Mar 3, 2026·5 min read·48 visits
OpenClaw gateway fails to validate symbolic links in agent workspaces. Attackers can read/write host files by symlinking allowlisted filenames to system paths. Fixed in version 2026.2.25.
A critical symbolic link traversal vulnerability exists in the OpenClaw gateway component, specifically within the `agents.files` API methods. The vulnerability permits attackers to bypass workspace isolation mechanisms by creating symbolic links with allowlisted filenames (e.g., `AGENTS.md`) that point to arbitrary locations on the host filesystem. Successful exploitation allows unauthorized read and write access to sensitive system files, potentially leading to full system compromise.
The OpenClaw gateway is responsible for managing AI agent workspaces, including the retrieval and modification of specific configuration files like AGENTS.md, BOOTSTRAP.md, and MEMORY.md. Ideally, these operations are strictly confined to the agent's specific workspace directory to prevent unauthorized access to the underlying host system.
A critical flaw in the path resolution logic allows this containment to be breached. While the application validates that the requested filename matches an entry in a strict allowlist, it fails to verify the physical nature of the file on the disk. Specifically, it does not check if the target file is a symbolic link pointing outside the intended directory structure. This allows an attacker who can manipulate the workspace filesystem to map a valid filename to a sensitive system path, effectively tricking the gateway into performing operations on the external target.
The vulnerability stems from an insecure implementation of file path resolution (CWE-59: Improper Link Resolution Before File Access). The application relied on a superficial check of the requested filename string without canonicalizing the resulting path or inspecting filesystem metadata.
Technical Deficiencies:
path.join(workspaceDir, filename). This method resolves logical path components (like ..) but does not resolve symbolic links on the filesystem.realpath to resolve the final destination of the file path before authorizing the operation.The remediation involves a fundamental change in how file paths are resolved and validated before any I/O operation occurs. The fix introduces a strict verification routine that resolves symbolic links and enforces directory containment.
Vulnerable Logic (Conceptual):
The original implementation likely performed a direct join without validation:
// Vulnerable: Trusted that 'name' being allowlisted was sufficient
const targetPath = path.join(workspaceDir, name);
// ... subsequent fs.readFile(targetPath) or fs.writeFile(targetPath)Patched Logic:
The fix introduces a helper resolveAgentWorkspaceFilePath that canonicalizes paths and explicitly forbids traversal. The following logic mirrors the patch strategy described in the advisory:
async function resolveAgentWorkspaceFilePath(workspaceDir, name) {
// 1. Resolve the canonical path of the workspace root
const workspaceReal = await fs.realpath(workspaceDir);
// 2. Construct candidate path
const candidatePath = path.join(workspaceReal, name);
// 3. Check for symlink escape using lstat (to see the link itself)
// and realpath (to see where it goes)
const stats = await fs.lstat(candidatePath);
if (stats.isSymbolicLink()) {
const targetReal = await fs.realpath(candidatePath);
// 4. Guard: Ensure the resolved target is still inside the workspace
if (!targetReal.startsWith(workspaceReal)) {
throw new Error("Security violation: unsafe workspace file");
}
}
return candidatePath;
}Additionally, the patch utilizes the O_NOFOLLOW flag during file open operations where supported, providing kernel-level protection against symlink following during the open syscall.
Exploiting this vulnerability requires the attacker to have the ability to create files within the agent's workspace. This is often achievable if the attacker controls the agent's execution environment or can influence the agent to write files.
Attack Scenario:
AGENTS.md), but the link target points to a sensitive system file.
ln -s /etc/passwd /workspace/test-agent/AGENTS.mdagents.files.get API for the file AGENTS.md.AGENTS.md is an allowed name. It constructs the path /workspace/test-agent/AGENTS.md and opens it for reading. The operating system follows the symlink to /etc/passwd./etc/passwd to the attacker.Proof of Concept (Regression Test):
The following test case demonstrates the attack vector and the expected rejection in the patched version:
it("rejects agents.files.get when allowlisted file symlink escapes workspace", async () => {
const workspace = "/workspace/test-agent";
const candidate = `${workspace}/AGENTS.md`;
// Mock filesystem state: AGENTS.md points to /outside/secret.txt
mocks.fsRealpath.mockImplementation(async (p: string) => {
if (p === candidate) return "/outside/secret.txt";
return p;
});
// The API call attempts to read the compromised file
const { respond, promise } = makeCall("agents.files.get", {
agentId: "main",
name: "AGENTS.md",
});
await promise;
// Expectation: The system detects the traversal and errors out
expect(respond).toHaveBeenCalledWith(
false,
undefined,
expect.objectContaining({ message: expect.stringContaining("unsafe workspace file") }),
);
});The impact of this vulnerability is critical, characterized by a complete loss of confidentiality and integrity regarding the host filesystem.
/etc/passwd, environment variable files containing API keys, SSH private keys (~/.ssh/id_rsa), and source code.agents.files.set method, attackers can overwrite arbitrary files. This can lead to Remote Code Execution (RCE) by overwriting authorized_keys, crontabs, or application configuration files.The vulnerability is patched in openclaw version 2026.2.25. The fix enforces strict path resolution logic.
Immediate Actions:
openclaw dependency to ^2026.2.25 immediately.CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
openclaw OpenClaw | < 2026.2.25 | 2026.2.25 |
| Attribute | Detail |
|---|---|
| Vulnerability ID | GHSA-FGVX-58P6-GJWC |
| CWE ID | CWE-59 |
| CVSS Score | 9.8 (Critical) |
| Attack Vector | Network |
| Affected Component | agents.files API |
| Patched Version | 2026.2.25 |
An authentication bypass in the SiYuan personal knowledge management system before version 3.7.0 exposes a dynamic icon rendering endpoint. This endpoint processes client-supplied Go template directives. By submitting a crafted request, an unauthenticated remote attacker can leverage registered database template functions to execute arbitrary read-only SQL queries and exfiltrate workspace contents.
CVE-2026-54069 is a critical authentication bypass vulnerability in the SiYuan Note personal knowledge management system. The flaw is located in the HTTP server's middleware handling API authorization, which unconditionally trusts requests carrying a 'chrome-extension://' scheme in the Origin HTTP header, granting administrative access without validating API tokens.
CVE-2026-54089 is a critical authentication bypass vulnerability in File Browser affecting instances configured with proxy-based authentication. An unauthenticated remote attacker with direct network access can impersonate arbitrary users or register new accounts by spoofing configured HTTP headers.
The malicious Cargo package 'exploration' was uploaded to the crates.io registry. During compilation or package import, the crate executes code designed to establish an outbound TCP/HTTP connection, download an external second-stage binary, and execute the binary locally on the host machine. This creates an unauthenticated remote code execution vector impacting developer environments and continuous integration pipelines.
CVE-2026-54088 is a critical command injection vulnerability in File Browser prior to version 2.63.6. When Hook Authentication is enabled, the application interpolates unsanitized credentials into a shell command, allowing unauthenticated remote code execution.
An authenticated remote code execution vulnerability exists in NotrinosERP (versions up to and including 1.0.0) within the Human Resource Management (HRM) module. Users with employee management permissions can upload arbitrary file types, including PHP scripts, which are written directly to a web-accessible directory. This allows for arbitrary code execution in the context of the web-server user.