/

CVE-2026-27626

Severity:

CRITICAL RISK

(9.9)

OS Command Injection in OliveTin Shell Mode and Webhook

CVE-2026-27626

Analyzed

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution on OliveTin Host

Severity:

CRITICAL RISK

(9.9)

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

OliveTin, a tool for exposing predefined shell commands via a web interface, contains a critical OS command injection flaw that allows arbitrary command execution through unsafe argument handling.

Authenticated users and, in many scenarios, unauthenticated webhook callers can inject shell metacharacters into commands executed via sh -c, leading to remote code execution on the OliveTin host.

Affected context

This vulnerability affects OliveTin deployments up to and including version 3000.10.0 that use Shell mode to run system commands from the web UI or via webhooks.

It manifests when:

  • Actions accept arguments typed as password, which are not subject to the same shell safety checks as other argument types, and/or
  • Actions are invoked via webhooks that pass JSON values directly into shell commands without type validation.

Environments where web registration is enabled (default) and where OliveTin receives external webhooks are particularly exposed, but even internal-only setups may be at risk if any user can configure or trigger shell-based actions.

Exploit preconditions

  • Attack surface (vector 1 – password-typed arguments):
  • Access to the OliveTin web interface.
  • Ability to trigger an action that uses Shell mode and accepts a password-typed argument.
  • Required access (vector 1):
  • Any authenticated user account; registration is enabled by default and authType: none is the default configuration, effectively making access low-barrier in many setups.
  • Trigger point (vector 1):
  • Submission of a crafted password argument containing shell metacharacters that OliveTin passes into sh -c.
  • Why exploitation is possible (vector 1):
  • The checkShellArgumentSafety routine enforces restrictions on some argument types but omits password, allowing shell-special characters to reach the command interpreter.
  • Attack surface (vector 2 – webhook JSON injection):
  • Any HTTP endpoint configured to accept webhooks that trigger Shell mode actions with parameters derived from JSON payloads.
  • Required access (vector 2):
  • Ability to send webhook requests to the exposed OliveTin instance; this is often unauthenticated and reachable from external systems, which is a primary OliveTin use case.
  • Trigger point (vector 2):
  • Supplying JSON values that are inserted into shell commands and executed via sh -c without type safety checks or shell escaping.
  • Why exploitation is possible (vector 2):
  • The JSON-derived values bypass the argument type safety logic entirely and are interpolated directly into shell command strings.
  • Combined impact:
  • When both vectors are present (Shell mode + webhook-triggered actions), an attacker on the network can often chain them to achieve unauthenticated remote command execution on the OliveTin host.

Why this happens

The underlying flaw is a classic OS command injection pattern, mapped to CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

In OliveTin:

  • Shell commands are constructed as strings and executed via sh -c.
  • The checkShellArgumentSafety mechanism attempts to sanitize user-supplied arguments but treats password-typed arguments as trusted, failing to neutralize shell metacharacters.
  • For webhook-driven actions, JSON values are extracted and passed to shell commands without any type validation or escaping, fully bypassing the safety layer.

Conceptually, untrusted input is concatenated or interpolated into a shell command string and given to a command interpreter without robust escaping, parameterization, or isolation. This design allows attackers to break out of the intended command structure and execute arbitrary OS commands with the privileges of the OliveTin process.

Potential impact

  • Execution of arbitrary OS commands on the OliveTin host with the permissions of the OliveTin process.
  • Complete compromise of the OliveTin-managed system, including reading and modifying files that the OliveTin user can access.
  • Pivoting into the surrounding network environment, including lateral movement or further attacks from the compromised host.
  • Tampering with automation workflows, scheduled tasks, and operational scripts managed through OliveTin.
  • Service disruption, including denial of service by killing processes, consuming resources, or modifying configurations.

General mitigation guidance

Since the issue stems from unsafe shell command construction and trust in user-controlled arguments, mitigation focuses on reducing shell exposure and tightening trust boundaries:

  • Prefer non-shell execution models where possible:
  • Use direct system calls, parameterized APIs, or language-level process execution functions that accept argument arrays rather than shell-joined strings.
  • Apply strict validation and normalization for all user- and webhook-supplied inputs:
  • Treat all argument types (including password) as untrusted.
  • Enforce whitelists for allowed characters or patterns, especially for parameters that influence command-line arguments.
  • Isolate automation tasks:
  • Run OliveTin (and the commands it invokes) under a least-privilege account with minimal filesystem and network capabilities.
  • Consider sandboxing or containerization so that even successful command injection has limited scope.
  • Harden webhook handling:
  • Restrict which systems can send webhooks via network controls such as IP allowlists or private network placement.
  • Introduce authentication or shared-secret validation for inbound webhooks to reduce unsolicited control.
  • Design commands defensively:
  • Avoid building command strings via concatenation; treat any external input as data, not as part of the command syntax.
  • Use strict argument typing and avoid generic free-form text for commands that run in Shell mode.

How teams detect issues like this

Detection efforts should focus both on static inspection of configuration/ code and runtime monitoring:

  • Static analysis and configuration review:
  • Search for Shell mode actions that interpolate user-supplied or webhook-sourced values directly into sh -c or similar shell invocations.
  • Flag any logic that bypasses argument type safety or special-cases password-typed arguments as trusted.
  • Look for string concatenation patterns that mix literals with request fields (e.g., JSON properties) to form shell commands.
  • Policy and CI enforcement:
  • Implement internal policies forbidding construction of shell commands from untrusted input without approved escaping or parameterization.
  • Use automated checks in CI/CD pipelines to identify new or changed actions that introduce Shell mode dependency on externally controlled values.
  • Runtime monitoring:
  • Log and monitor executed commands from OliveTin for unexpected patterns, such as inclusion of shell metacharacters (;, &&, |, backticks, etc.) originating from user inputs.
  • Correlate webhook traffic with command execution logs to identify abnormal payloads or frequent failures indicative of probing or exploitation attempts.
  • Automated tools:
  • Generic static application security testing (SAST) tools can help identify OS command injection patterns where application configuration is stored as code (e.g., Infrastructure as Code or declarative action definitions).

Sources

SourceLink
github.comgithub.com/OliveTin/OliveTin/security/advisories/GHSA-49gm-hh7w-wfvf

Frequently asked

questions

It is remotely exploitable. In many deployments, authenticated users can exploit it via the web interface, and unauthenticated attackers may exploit it through webhook endpoints if those are reachable from external networks.

For the password-argument vector, an attacker typically needs the ability to access the OliveTin UI as a user, which may be trivial when registration and authType: none defaults are used. For the webhook JSON vector, an attacker only needs network access to send crafted webhook requests to an exposed OliveTin endpoint.

The safest pattern is to avoid building shell commands from untrusted input altogether. Where command execution is necessary, use parameterized process execution APIs that pass arguments as separate parameters, apply strict allowlisting validation to all inputs, and ensure no untrusted data is interpreted by a shell.

Treat all external inputs—UI fields, webhooks, configuration files—as untrusted by default; design commands so that user data is handled only as data, never as part of shell syntax. Adopt secure defaults that disable Shell mode or heavily constrain it, enforce authentication and authorization on all control surfaces, and incorporate security-focused code reviews and automated scanning for injection patterns in both application and configuration logic.

Find out what's already
exploitable in your codebase.