Mar 3, 2026·5 min read·47 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 |
A CSV Formula Injection vulnerability (CWE-1236) exists in the Spree headless eCommerce platform within the customer export functionality. An unauthenticated attacker can register a customer profile containing malicious formula sequences in fields like the first name or last name. When an administrator exports the customer data to a CSV file and opens it in a spreadsheet application, the spreadsheet engine can interpret and execute these formulas, potentially leading to remote command execution on the administrator's workstation or out-of-band data exfiltration.
A Stored Cross-Site Scripting (XSS) vulnerability exists in WWBN AVideo versions up to and including 29.0. Unsanitized category descriptions are stored in the database and subsequently rendered as raw HTML in the Gallery view plugin, allowing low-privileged authenticated users to execute arbitrary JavaScript in the browsers of visiting users.
A critical supply chain compromise was identified in the Node.js package @cap-js/openapi at version 1.4.1. An attacker gained unauthorized publishing access to the npm registry and distributed a backdoored release that harvests sensitive developer credentials, environment variables, and SSH keys. The malicious code then exfiltrates the collected data to external actor-controlled servers.
An authenticated wallet credit bypass vulnerability exists in WWBN AVideo version 29.0 and earlier. The AuthorizeNet plugin includes an unfinished mockup endpoint, processPayment.json.php, which lacks actual transaction verification and hardcodes success. This allows any authenticated user to credit their wallet with arbitrary balances without making any payments.
An unauthenticated stored DOM-based Cross-Site Scripting (DOM XSS) vulnerability in the YPTSocket plugin of WWBN AVideo (formerly YouPHPTube) allows remote attackers to execute arbitrary JavaScript within the session context of administrative users. Unsanitized metadata parameters supplied during the WebSocket handshake are persisted in an SQLite database and broadcast to connected users. The frontend application processes these parameters through an unsafe jQuery append sink, leading to silent, high-impact administrative context compromise.
A path parsing and normalization inconsistency vulnerability exists in the Hono web framework prior to version 4.12.21. When hosting sub-applications via the app.mount() routing interface, Hono calculates the routing path prefix length on a percent-decoded representation of the URI but executes the path-slicing offset on the raw, percent-encoded string. This discrepancy results in malformed request paths being dispatched to mounted sub-applications, potentially leading to route bypasses, route confusion, and application-level Denial of Service.