{"vuln_id":"CVE-2026-27626","aliases":[],"description":"OliveTin gives access to predefined shell commands from a web interface. In versions up to and including 3000.10.0, OliveTin's shell mode safety check (`checkShellArgumentSafety`) blocks several dangerous argument types but not `password`. A user supplying a `password`-typed argument can inject shell metacharacters that execute arbitrary OS commands. A second independent vector allows unauthenticated RCE via webhook-extracted JSON values that skip type safety checks entirely before reaching `sh -c`. When exploiting vector 1, any authenticated user (registration enabled by default, `authType: none` by default) can execute arbitrary OS commands on the OliveTin host with the permissions of the OliveTin process. When exploiting vector 2, an unauthenticated attacker can achieve the same if the instance receives webhooks from external sources, which is a primary OliveTin use case. When an attacker exploits both vectors, this results in unauthenticated RCE on any OliveTin instance using Shell mode with webhook-triggered actions. As of time of publication, a patched version is not available.","published_at":"2026-02-25T03:16:06.347000Z","modified_at":"2026-06-17T10:27:24.823000Z","first_seen_at":"2026-11-21T19:15:20.142981Z","severity":"critical","severity_source":"nvd","cvss_score":9.9,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","cwe":["CWE-78"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00627,"epss_percentile":0.50987,"nvd_status":"Analyzed","enriched_at":"2026-11-22T13:36:53.722915Z","links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-27626"},"matched_alias":null,"items":[{"id":10981,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-vc6p-m6vx-6cwq: OliveTin: Second-Order OS Command Injection via shellAfterCompleted","summary":"OliveTin: Second-Order OS Command Injection via shellAfterCompleted\n\n## Summary\n\nOliveTin'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.\n\nThis 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.\n\n## Affected Versions\n\n- All versions containing `shellAfterCompleted` functionality (current codebase through latest)\n\n## Details\n\n### Vulnerable Code Path\n\nIn `service/internal/executor/executor.go`, the `stepExecAfter` function handles post-execution commands:\n\n```go\nfunc stepExecAfter(req *ExecutionRequest) bool {\n    if req.Binding.Action.ShellAfterCompleted == \"\" {\n        return true\n    }\n\n    // These variables are injected WITHOUT any type checking or sanitization\n    args := map[string]string{\n        \"output\":                 req.logEntry.Output,           // Arbitrary command stdout/stderr\n        \"exitCode\":               fmt.Sprintf(\"%v\", req.logEntry.ExitCode),\n        \"ot_executionTrackingId\": req.TrackingID,\n        \"ot_username\":            req.AuthenticatedUser.Username, // User-controlled via trusted headers\n    }\n\n    // Template rendered with unsanitized args\n    finalParsedCommand, err := tpl.ParseTemplateWithActionContext(\n        req.Binding.Action.ShellAfterCompleted,\n        req.Binding.Entity,\n        args,\n    )\n\n    // Directly passed to sh -c — NO safety check\n    cmd := wrapCommandInShell(ctx, finalParsedCommand)\n    // ...\n}\n```\n\nThe `wrapCommandInShell` function (in `executor_unix.go`) executes:\n\n```go\nfunc wrapCommandInShell(ctx *ExecutionContext, finalParsedCommand string) *exec.Cmd {\n    return exec.CommandContext(ctx, \"sh\", \"-c\", finalParsedCommand)\n}\n```\n\n### Why This Bypasses Existing Protections\n\nThe 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.\n\n**`stepExecAfter` calls none of these checks.** The `output` variable is:\n- Not a declared argument with a type — it's internally created\n- Not validated against any regex or type system\n- Not passed through `checkShellArgumentSafety`\n- Directly interpolated into a shell command template\n\n\n\nAffected: Go:github.com/OliveTin/OliveTin\n\nFixed in: 0.0.0-20260728155752-e5d29b68da66\n\nReferences:\nhttps://github.com/OliveTin/OliveTin/security/advisories/GHSA-vc6p-m6vx-6cwq\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-75506\nhttps://github.com/OliveTin/OliveTin/pull/1070\nhttps://github.com/OliveTin/OliveTin/pull/1088\nhttps://github.com/OliveTin/OliveTin/commit/4ef86abee7aac4e4ec4a3200c7ca491ca3501065\nhttps://github.com/OliveTin/OliveTin/commit/e5d29b68da66fd7f99072d6afd336dee2c28876c\nhttps://github.com/OliveTin/OliveTin\nhttps://github.com/OliveTin/OliveTin/releases/tag/3000.17.0","url":"https://osv.dev/vulnerability/GHSA-vc6p-m6vx-6cwq","published_at":"2026-11-18T21:55:09Z","updated_at":"2026-11-18T22:00:04.129389Z","fetched_at":"2026-11-21T19:15:55.946346Z","severity":"critical","cvss_score":9.9,"epss":0.00627,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/OliveTin/OliveTin","vuln_id":"CVE-2026-75506","vuln_ids":["CVE-2026-27626","CVE-2026-75506","GHSA-VC6P-M6VX-6CWQ"],"tags":["osv","go","fix-available"],"cluster_id":2285,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10981","html":"https://vulnwatch.ve1ve2.com/item/10981"}},{"id":2427,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-vc6p-m6vx-6cwq / CVE-2026-75506: OliveTin: Second-Order OS Command Injection via shellAfterCompleted","summary":"OliveTin: Second-Order OS Command Injection via shellAfterCompleted\n\n## Summary\n\nOliveTin'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.\n\nThis 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.\n\n## Affected Versions\n\n- All versions containing `shellAfterCompleted` functionality (current codebase through latest)\n\n## Details\n\n### Vulnerable Code Path\n\nIn `service/internal/executor/executor.go`, the `stepExecAfter` function handles post-execution commands:\n\n```go\nfunc stepExecAfter(req *ExecutionRequest) bool {\n    if req.Binding.Action.ShellAfterCompleted == \"\" {\n        return true\n    }\n\n    // These variables are injected WITHOUT any type checking or sanitization\n    args := map[string]string{\n        \"output\":                 req.logEntry.Output,           // Arbitrary command stdout/stderr\n        \"exitCode\":               fmt.Sprintf(\"%v\", req.logEntry.ExitCode),\n        \"ot_executionTrackingId\": req.TrackingID,\n        \"ot_username\":            req.AuthenticatedUser.Username, // User-controlled via trusted headers\n    }\n\n    // Template rendered with unsanitized args\n    finalParsedCommand, err := tpl.ParseTemplateWithActionContext(\n        req.Binding.Action.ShellAfterCompleted,\n        req.Binding.Entity,\n        args,\n    )\n\n    // Directly passed to sh -c — NO safety check\n    cmd := wrapCommandInShell(ctx, finalParsedCommand)\n    // ...\n}\n```\n\nThe `wrapCommandInShell` function (in `executor_unix.go`) executes:\n\n```go\nfunc wrapCommandInShell(ctx *ExecutionContext, finalParsedCommand string) *exec.Cmd {\n    return exec.CommandContext(ctx, \"sh\", \"-c\", finalParsedCommand)\n}\n```\n\n### Why This Bypasses Existing Protections\n\nThe 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.\n\n**`stepExecAfter` calls none of these checks.** The `output` variable is:\n- Not a declared argument with a type — it's internally created\n- Not validated against any regex or type system\n- Not passed through `checkShellArgumentSafety`\n- Directly interpolated into a shell command template\n\n\n\nAffected packages: go:github.com/OliveTin/OliveTin\nPatched: github.com/OliveTin/OliveTin 0.0.0-20260728155752-e5d29b68da66","url":"https://github.com/advisories/GHSA-vc6p-m6vx-6cwq","published_at":"2026-11-18T21:55:09Z","updated_at":"2026-11-18T21:55:10Z","fetched_at":"2026-11-21T19:15:18.416828Z","severity":"critical","cvss_score":9.9,"epss":0.00627,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/OliveTin/OliveTin","vuln_id":"CVE-2026-75506","vuln_ids":["CVE-2026-27626","CVE-2026-75506","GHSA-VC6P-M6VX-6CWQ"],"tags":["ghsa","go","CWE-74","CWE-78"],"cluster_id":2285,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2427","html":"https://vulnwatch.ve1ve2.com/item/2427"}}]}