CVE-2026-54555
Received Received - Intake
Command Injection in rtk Prior to 0.42.2

Publication date: 2026-06-23

Last updated on: 2026-06-23

Assigner: GitHub, Inc.

Description
rtk filters and compresses command outputs before they reach your LLM context. Prior to 0.42.2, the permission splitter did not conservatively split or reject several shell constructs that Bash treats as command execution boundaries or nested execution. As a result, a command beginning with an allowed prefix such as git could hide a second command behind one of these constructs. rtk rewrite returned exit code 0, causing the Claude hook to emit permissionDecision: "allow". The rewritten command still contained the hidden command, so it ran without the user confirmation or denial that the permission rules were intended to enforce. This vulnerability is fixed in 0.42.2.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-23
Last Modified
2026-06-23
Generated
2026-06-24
AI Q&A
2026-06-23
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 3 associated CPEs
Vendor Product Version / Range
rtk-ai rtk to 0.42.2 (exc)
rtk-ai rtk to 0.40.0 (exc)
rtk-ai rtk to dev-0.43.0-rc.242 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-863 The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Detection Guidance

This vulnerability involves the rtk tool's permission splitter failing to properly handle certain shell constructs, allowing hidden commands to execute without user confirmation.

Detection involves monitoring for commands that use allowed prefixes (e.g., git) combined with shell constructs such as newlines, background operators (&), or command substitutions ($() or backticks) that could hide additional commands.

Since the issue is in the rewriting and permission decision process of rtk, you can detect exploitation attempts by examining logs or outputs of rtk rewrite commands for unexpected exit codes or hidden commands.

  • Check rtk rewrite exit codes: commands that should be denied but return 0 (auto-allow) may indicate exploitation.
  • Search for shell commands containing allowed prefixes followed by suspicious shell constructs like newlines, &, $(), or backticks.
  • Example command to detect suspicious commands in logs or scripts: grep -E 'git.*( |&|\$\(|`)' /path/to/command/logs
Executive Summary

CVE-2026-54555 is a permission-gate bypass vulnerability in the rtk tool that affects versions up to 0.40.0 (and certain release candidates). The issue arises because the permission splitter in rtk does not properly handle certain shell constructs that Bash treats as command execution boundaries, such as newlines, background operators (&), and command substitutions ($() or backticks).

This flaw allows a command starting with an allowed prefix (like "git") to hide a second, potentially malicious command behind these shell constructs. The rtk rewrite function incorrectly returns an exit code of 0, which causes the Claude hook to automatically allow the command without user confirmation or denial, bypassing the intended permission rules.

As a result, the hidden command executes without the expected security checks, enabling attackers to run unauthorized commands.

Impact Analysis

This vulnerability can lead to unauthorized command execution within environments using the rtk tool as a Claude Code PreToolUse hook. Attackers can exploit it to run hidden commands without user approval, potentially causing severe impacts such as file deletion, data exfiltration, or other malicious activities.

Because the permission rules are bypassed, users or systems relying on rtk for command authorization may unknowingly allow harmful commands to execute, compromising system integrity, confidentiality, and availability.

Compliance Impact

This vulnerability allows hidden commands to be executed without user confirmation or denial, bypassing intended permission rules. Such unauthorized command execution can lead to data exfiltration or deletion, which may compromise the confidentiality, integrity, and availability of sensitive data.

Because of this, organizations using affected versions of rtk may face challenges in maintaining compliance with standards and regulations like GDPR or HIPAA, which require strict controls over data access and processing to protect personal and sensitive information.

Mitigation Strategies

The vulnerability is fixed in rtk version 0.42.2. The immediate mitigation step is to upgrade rtk to version 0.42.2 or later.

The fix ensures that the permission checker properly splits command segments on newlines and background operators outside quotes, treats command substitutions as non-attestable for auto-allow, and avoids false positives for redirect operators.

Until the upgrade is applied, consider restricting or monitoring usage of rtk as a Claude Code PreToolUse hook, especially commands with allowed prefixes that may hide additional commands.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-54555. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart