Home/Research/Post

GHSA-vc6p-m6vx-6cwq: OliveTin: Second-Order OS Command Injection via shellAfterCompleted

  • Severity: MEDIUM
  • CVE: CVE-2026-75506
  • Ecosystems: go
  • Packages: github.com/OliveTin/OliveTin

## Summary

OliveTin’s `shellAfterCompleted` post-execution hook injects unsanitized variables — including arbitrary command output (`output`), the authenticated username (`ot_username`), and the exit code (`exitCode`) — directly into a shell command template processed by `sh -c`. Unlike the main action’s argument handling, **no `checkShellArgumentSafety` validation is applied** to these variables. An attacker who can influence the output of a command (e.g., via user-supplied arguments that reflect in stdout, or through trusted-header username spoofing) can inject arbitrary OS commands into the post-execution shell.

This is a **distinct** finding from CVE-2026-27626 (OS command injection via `password` type in webhooks). That CVE addressed argument types bypassing shell safety checks in the primary execution step. This vulnerability exists in the **post-execution step** (`stepExecAfter`), which has **zero** safety checks on any of its template variables.

## Affected Versions

– All versions containing `shellAfterCompleted` functionality (current codebase through latest)

## Details

### Vulnerable Code Path

In `service/internal/executor/executor.go`, the `stepExecAfter` function handles post-execution commands:

“`go
func stepExecAfter(req *ExecutionRequest) bool {
if req.Binding.Action.ShellAfterCompleted == “” {
return true
}

// These variables are injected WITHOUT any type checking or sanitization
args := map[string]string{
“output”: req.logEntry.Output, // Arbi…

Source: GitHub Security Advisories · 2026-11-18