CVE-2026-55249

@rtk-ai/rtk-rewrite: OpenClaw Rewrite Plugin Command Injection via execSync Template String

Published Jun 23, 2026 CVSS 3.1 · 6.3 Medium EPSS < 1% KEV · Not listed
Description
@rtk-ai/rtk-rewrite transparently rewrites shell commands executed via OpenClaw's exec tool to their RTK equivalents. In 1.0.0, the @rtk-ai/rtk-rewrite OpenClaw plugin passes attacker-controlled input directly into a shell-backed execSync() template string without shell-safe escaping. JSON.stringify() wraps the value in double quotes and escapes inner double-quotes and backslashes, but leaves $() and backtick shell metacharacters untouched. Because execSync delegates execution to /bin/sh -c, the shell expands $(...) substitutions even inside double-quoted strings, causing the injected subcommand to execute before rtk is invoked. An attacker who can influence the exec tool's command parameter (e.g., via an LLM agent prompt or gateway/tool-call input) achieves arbitrary OS command execution with the privileges of the plugin/gateway process.

Analysis

AI-generated

Technical impact

The vulnerability is a command injection flaw that occurs when the @rtk-ai/rtk-rewrite plugin forwards attacker‑controlled input into a shell‑backed execSync template string. Because the shell expands $() and backtick expressions inside double‑quoted strings, an attacker can cause arbitrary OS commands to run before the intended RTK operation, giving them the privileges of the gateway or plugin process.

Affected Systems

The affected component is the @rtk-ai/rtk-rewrite OpenClaw plugin bundled with rtk‑ai:rtk. Version 1.0.0 of the plugin is known to contain this flaw, and any OpenClaw deployment that includes this version is vulnerable.

Risk and Exploitability

The CVSS score of 6.3 indicates a moderate risk, and the exploit probability score is not currently available. The vulnerability is not listed in CISA’s KEV catalog. An attacker who can influence the exec tool’s command parameter—such as through an LLM agent prompt or gateway/tool‑call input—can trigger the flaw and execute any shell command with the privileges of the running process.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update to the latest @rtk-ai/rtk release that implements the execSync input sanitization fix.
  • If a patch is not yet available, remove or tightly restrict any user input that feeds into the exec tool’s command parameter to eliminate shell metacharacters such as $ , ` , or |.
  • Replace the execSync call with a safer execution strategy that does not invoke /bin/sh, for example by passing an argument array to child_process.execFile or by explicitly escaping user input before passing it to the shell.

Generated by OpenCVE AI on June 24, 2026 at 10:13 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Rtk-ai
Rtk-ai rtk
Vendors & Products Rtk-ai
Rtk-ai rtk
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description @rtk-ai/rtk-rewrite transparently rewrites shell commands executed via OpenClaw's exec tool to their RTK equivalents. In 1.0.0, the @rtk-ai/rtk-rewrite OpenClaw plugin passes attacker-controlled input directly into a shell-backed execSync() template string without shell-safe escaping. JSON.stringify() wraps the value in double quotes and escapes inner double-quotes and backslashes, but leaves $() and backtick shell metacharacters untouched. Because execSync delegates execution to /bin/sh -c, the shell expands $(...) substitutions even inside double-quoted strings, causing the injected subcommand to execute before rtk is invoked. An attacker who can influence the exec tool's command parameter (e.g., via an LLM agent prompt or gateway/tool-call input) achieves arbitrary OS command execution with the privileges of the plugin/gateway process.
Title @rtk-ai/rtk-rewrite: OpenClaw Rewrite Plugin Command Injection via execSync Template String
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 6.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:N'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 23, 2026, 6:53 PM
Reserved
Jun 16, 2026, 4:44 PM
Status
Analyzed
Published
Jun 23, 2026, 7:17 PM
Modified
Oct 25, 2026, 11:10 PM