/

CVE-2026-112263

Severity:

HIGH RISK

(7.8)

OS Command Injection (CWE-78) in Television format_command

CVE-2026-112263

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary command execution

Severity:

HIGH RISK

(7.8)

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

Television (tv) versions 0.15.0 through 0.15.9 contain an OS command injection flaw in the handling of improperly escaped single quotes within format_command.

An attacker who can create or introduce a file with a crafted name may cause a triggered action, such as the default edit action, to execute shell commands with the victim's privileges.

Television (tv) versions 0.15.0 through 0.15.9 contain an OS command injection flaw in the handling of improperly escaped single quotes within format_command.

An attacker who can create or introduce a file with a crafted name may cause a triggered action, such as the default edit action, to execute shell commands with the victim's privileges.

Affected context

The vulnerability occurs in Television installations that use the affected format_command logic when constructing commands from file names or related user-controlled paths. Exploitation becomes risky when an attacker can plant or influence a file name and a victim subsequently triggers an action that invokes the default edit command.

The vulnerability occurs in Television installations that use the affected format_command logic when constructing commands from file names or related user-controlled paths. Exploitation becomes risky when an attacker can plant or influence a file name and a victim subsequently triggers an action that invokes the default edit command.

Exploit preconditions

  • Attack surface: The command-formatting and action-execution path in Television.
  • Required access: Ability to create, rename, or otherwise introduce a file with a crafted name in a location processed by the application.
  • Trigger point: A victim or automated workflow invokes an action such as the default edit action.
  • Why exploitation is possible: Improper escaping of single quotes allows file-name content to alter the constructed shell command rather than remain data-only.
  • Attack surface: The command-formatting and action-execution path in Television.
  • Required access: Ability to create, rename, or otherwise introduce a file with a crafted name in a location processed by the application.
  • Trigger point: A victim or automated workflow invokes an action such as the default edit action.
  • Why exploitation is possible: Improper escaping of single quotes allows file-name content to alter the constructed shell command rather than remain data-only.

Why this happens

The underlying bug is an OS command injection condition caused by composing a shell command from insufficiently escaped file-name data. When input containing shell-significant characters is interpolated into a command string, the shell may interpret part of that data as command syntax. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command.

The underlying bug is an OS command injection condition caused by composing a shell command from insufficiently escaped file-name data. When input containing shell-significant characters is interpolated into a command string, the shell may interpret part of that data as command syntax. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command.

Potential impact

  • An attacker may execute arbitrary shell commands with the victim's privileges.
  • Local files and application data could be read, modified, or deleted.
  • The affected user's account or session could be compromised.
  • Malicious commands could modify files, establish persistence, or affect connected systems.
  • An attacker may execute arbitrary shell commands with the victim's privileges.
  • Local files and application data could be read, modified, or deleted.
  • The affected user's account or session could be compromised.
  • Malicious commands could modify files, establish persistence, or affect connected systems.

General mitigation guidance

Mitigation generally focuses on eliminating shell interpretation and reducing trust in file-name data.

Common defensive patterns include:

  • Prefer direct process execution APIs that accept an argument array rather than building shell command strings.
  • Treat file names and paths as untrusted data, even when they originate from local storage.
  • Apply context-appropriate escaping only when shell execution cannot be avoided, and keep command construction centralized.
  • Use allowlisted editor or action configurations instead of accepting arbitrary command templates.
  • Run the application with least-privilege accounts and restrict filesystem and process permissions.
  • Add regression tests covering shell metacharacters, quotes, whitespace, and unusual Unicode in file names.

Mitigation generally focuses on eliminating shell interpretation and reducing trust in file-name data.

Common defensive patterns include:

  • Prefer direct process execution APIs that accept an argument array rather than building shell command strings.
  • Treat file names and paths as untrusted data, even when they originate from local storage.
  • Apply context-appropriate escaping only when shell execution cannot be avoided, and keep command construction centralized.
  • Use allowlisted editor or action configurations instead of accepting arbitrary command templates.
  • Run the application with least-privilege accounts and restrict filesystem and process permissions.
  • Add regression tests covering shell metacharacters, quotes, whitespace, and unusual Unicode in file names.

How teams detect issues like this

Detection can include static analysis for shell-spawning APIs, string interpolation near process execution, and command templates that incorporate file names or paths. Code review should flag manual quoting, incomplete escaping, and APIs that invoke a shell when direct argument-based execution is available. Runtime monitoring and policy enforcement can alert on unexpected child processes launched by the application, while automated security review tools may help identify command-construction patterns during development.

Detection can include static analysis for shell-spawning APIs, string interpolation near process execution, and command templates that incorporate file names or paths. Code review should flag manual quoting, incomplete escaping, and APIs that invoke a shell when direct argument-based execution is available. Runtime monitoring and policy enforcement can alert on unexpected child processes launched by the application, while automated security review tools may help identify command-construction patterns during development.

Sources

SourceLink
github.comgithub.com/alexpasmantier/television/blob/0.15.9/cable/unix/files.toml
github.comgithub.com/alexpasmantier/television/blob/0.15.9/television/utils/command.rs
github.comgithub.com/alexpasmantier/television/commit/32695ccc6cd2b05cf7f1d3b80c24e324d5343eec
github.comgithub.com/alexpasmantier/television/commit/d7d46abb791181a3b5b6eed05e72aafcaa0ef269
github.comgithub.com/alexpasmantier/television/issues/1166
vulncheck.comvulncheck.com/advisories/television-0.15.0-through-0.15.9-os-command-injection-via-external-action-formatting

Frequently asked

questions

Exploitation is generally dependent on local or shared-file access that allows an attacker to plant or influence a file name. Remote exploitability depends on whether another exposed service or workflow provides that file-creation capability.

The attacker typically needs the ability to create or rename a file with a crafted name in a location processed by Television. A victim or automated process must then trigger the affected action.

Avoid invoking a shell for editor or file actions and pass validated file paths as separate process arguments through a direct execution API.

Treat file names as untrusted input, use allowlisted commands, test special-character handling, apply least privilege, and enforce static-analysis or code-review policies for shell execution.

Exploitation is generally dependent on local or shared-file access that allows an attacker to plant or influence a file name. Remote exploitability depends on whether another exposed service or workflow provides that file-creation capability.

The attacker typically needs the ability to create or rename a file with a crafted name in a location processed by Television. A victim or automated process must then trigger the affected action.

Avoid invoking a shell for editor or file actions and pass validated file paths as separate process arguments through a direct execution API.

Treat file names as untrusted input, use allowlisted commands, test special-character handling, apply least privilege, and enforce static-analysis or code-review policies for shell execution.

Find out what's already
exploitable in your codebase.