GHSA-g2f6-pwvx-r275: Openclaw OpneClaw Accepts Unsanitized IMessage Attachment Vulnerability
HIGHGHSA-g2f6-pwvx-r275 is a HIGH opneclaw accepts unsanitized imessage attachment vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Openclaw libraries in the npm ecosystem. The issue involves opneclaw accepts unsanitized imessage attachment paths which allowed scp remote-path command injection. Remediation is available by upgrading affected packages to version 2026.3.13.
GHSA-g2f6-pwvx-r275 at a Glance
How to Fix GHSA-g2f6-pwvx-r275
To remediate this vulnerability, upgrade all affected Openclaw dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install openclaw@2026.3.13
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls openclaw
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-g2f6-pwvx-r275, inspect your project dependencies using npm:
npm ls openclaw
Analyze the terminal output to locate any version of Openclaw in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2026.3.13), your application is affected.
Note: The npm ls openclaw command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Openclaw, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-g2f6-pwvx-r275 Affected Openclaw Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
openclaw
|
npm |
< 2026.3.13
|
2026.3.13
|
References
Frequently Asked Questions
What is GHSA-g2f6-pwvx-r275?
Which Openclaw versions are affected?
What version fixes GHSA-g2f6-pwvx-r275?
Is openclaw affected?
What CWE is associated with GHSA-g2f6-pwvx-r275?
How can I check npm dependencies for GHSA-g2f6-pwvx-r275?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g2f6-pwvx-r275",
"modified" : "2026-03-16T20:41:12Z",
"published" : "2026-03-16T20:41:12Z",
"aliases" : [ ],
"summary" : "OpneClaw accepts unsanitized iMessage attachment paths which allowed SCP remote-path command injection",
"details" : "### Summary\n`openclaw` versions `<= 2026.3.12` accepted unsanitized iMessage remote attachment paths when staging files over SCP, allowing shell metacharacters in the remote path operand.\n\n### Affected Packages / Versions\n- Package: `openclaw` (`npm`)\n- Affected versions: `<= 2026.3.12`\n- Fixed version: `2026.3.13`\n\n### Details\nThe vulnerable path was the remote attachment staging flow in `src/auto-reply/reply/stage-sandbox-media.ts`. When `ctx.MediaRemoteHost` was set, OpenClaw staged the attachment by spawning `/usr/bin/scp` against `<remoteHost>:<remotePath>`. In affected releases, the remote host was normalized but the remote attachment path was not validated for shell metacharacters before being passed to the SCP remote operand. A sender-controlled iMessage attachment filename containing shell metacharacters could therefore trigger command execution on the configured remote host when remote attachment staging was enabled.\n\nThis issue is in scope under OpenClaw's trust model because it crosses an inbound content boundary into host command execution on a configured remote attachment host.\n\n### Fix\n`openclaw@2026.3.13` validates the SCP remote path before spawning `scp`. Current code calls `normalizeScpRemotePath(...)` and rejects paths containing shell metacharacters instead of passing them through to the remote shell.\n\nRegression coverage exists in `src/auto-reply/reply.stage-sandbox-media.scp-remote-path.test.ts` (`rejects remote attachment filenames with shell metacharacters before spawning scp`).\n\n### Fix Commit(s)\n- `a54bf71b4c0cbe554a84340b773df37ee8e959de`\n\nThanks @lintsinghua for reporting.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "openclaw"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2026.3.13"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2026.3.12"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/openclaw/openclaw/security/advisories/GHSA-g2f6-pwvx-r275"
}, {
"type" : "WEB",
"url" : "https://github.com/openclaw/openclaw/commit/a54bf71b4c0cbe554a84340b773df37ee8e959de"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/openclaw/openclaw"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-16T20:41:12Z",
"nvd_published_at" : null
}
}