/

CVE-2026-101032

Severity:

HIGH RISK

(7.0)

OS Command Injection (CWE-78) in Navi Cheatsheets

CVE-2026-101032

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary Command Execution

Severity:

HIGH RISK

(7.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Navi through version 2.24.0 does not properly escape cheatsheet variable values before substituting them into shell commands. An attacker who can place crafted file names in suggestion command directories may inject shell metacharacters and execute commands with the privileges of the victim running Navi.

Affected context

The vulnerability occurs in Navi's cheatsheet suggestion workflow when file names from configured suggestion command directories are incorporated into shell command strings. Risk depends on whether an attacker can create or influence files in those directories and whether a victim subsequently invokes the affected suggestion functionality.

Exploit preconditions

  • Attack surface: Navi cheatsheet suggestion and command-substitution logic
  • Required access: Ability to create or control a file name in a suggestion command directory
  • Trigger point: Processing a matching suggestion and substituting its file name into a shell command
  • Why exploitation is possible: File-name values are not sufficiently escaped before being interpreted by a shell
  • Execution context: Injected commands run with the privileges of the user operating Navi

Why this happens

The underlying bug is an OS command injection caused by combining attacker-influenced file-name data with shell command text without applying context-appropriate escaping or avoiding shell interpretation. Shell metacharacters in the substituted value can therefore alter command parsing, which maps to CWE-78, Improper Neutralization of Special Elements used in an OS Command.

Potential impact

  • An attacker may execute arbitrary commands as the victim user.
  • Local files and environment data could be accessed or modified.
  • User-level credentials or tokens could be exposed.
  • The affected workstation or development environment could be further compromised.
  • Commands could alter project files or other user-controlled resources.

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from

attacker-influenced data and reducing trust in file names.

Common defensive patterns include:

  • Prefer direct process-execution APIs with argument arrays rather than constructing shell command strings.
  • Apply strict, context-aware validation when file names must enter command-related workflows.
  • Treat directory contents and file names as untrusted input, even when they are locally sourced.
  • Restrict write access to suggestion command directories and separate trusted content from user-controlled content.
  • Run the application with the minimum filesystem and process privileges required.
  • Use allowlists for supported commands and enforce security checks before substitution or execution.

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules for shell command construction using file names or other external strings.
  • Code review checks for string concatenation, interpolation, or template substitution followed by shell execution.
  • Tests using shell metacharacters in file names to verify that values remain data rather than commands.
  • Repository and filesystem policies limiting who can write to directories consumed by suggestion features.
  • Runtime monitoring for unexpected child processes launched by Navi or unusual command activity.

Automated code review and software composition analysis tools may help identify related command-injection patterns.

Sources

SourceLink
github.comgithub.com/denisidoro/navi
github.comgithub.com/denisidoro/navi/blob/5515367dc8a2a561d2d82b8352f729b1da4120d3/src/commands/core/actor.rs#L159-L193
github.comgithub.com/denisidoro/navi/blob/5515367dc8a2a561d2d82b8352f729b1da4120d3/src/common/shell.rs#L39-L50
github.comgithub.com/denisidoro/navi/issues/1037
vulncheck.comvulncheck.com/advisories/navi-through-2.24.0-os-command-injection-via-cheatsheet-variables

Frequently asked

questions

Exploitation is not necessarily remote. It generally requires an attacker to influence file names in a directory that Navi scans, followed by a victim triggering the affected suggestion workflow.

The attacker needs the ability to create or rename files in a relevant suggestion command directory, or another mechanism that causes controlled file-name values to be processed.

Avoid invoking a shell with interpolated file-name data. Use direct process-execution interfaces with separated arguments, and validate values against a narrowly defined allowlist where appropriate.

Treat file names and directory contents as untrusted input, review all command-construction paths, restrict directory write permissions, and test command execution with hostile metacharacters.

Find out what's already
exploitable in your codebase.