CVE-2026-75506: Second-Order OS Command Injection in OliveTin shellAfterCompleted Hook
Vulnerability ID: CVE-2026-75506
CVSS Score: 6.6
Published: 2026-11-18
CVE-2026-75506 (GHSA-vc6p-m6vx-6cwq) is a second-order OS command injection vulnerability in OliveTin affecting versions 3000.0.0 prior to 3000.18.1. The post-execution hook mechanism, shellAfterCompleted, interpolates runtime execution outputs and username variables directly into a shell command string passed to sh -c without validation. When an action emits untrusted output containing shell metacharacters, those metacharacters break out of the intended syntax and execute arbitrary OS commands under the context of the OliveTin service process.
TL;DR
OliveTin versions 3000.0.0 through 3000.18.0 interpolate unsanitized command output into the shellAfterCompleted hook prior to executing it via sh -c. Attackers who can influence the output of a primary action or inject metacharacters into runtime variables can achieve arbitrary command execution. Upgrade to OliveTin 3000.18.1 to remediate the flaw.
⚠️ Exploit Status: POC
Technical Details
- Vulnerability Type: Second-Order OS Command Injection (CWE-78 / CWE-74)
- Affected Component: buildShellAfterCommand in service/internal/executor/executor.go
- CVSS v3.1 Score: 6.6 Medium (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H)
- Affected Versions: OliveTin >= 3000.0.0 and < 3000.18.1
- Patched Version: OliveTin 3000.18.1
- Attack Vector: Network (Untrusted command output or metadata interpolated into sh -c)
- Exploit Status: Functional PoC in official commit unit tests
- CISA KEV Status: Not Listed
Affected Systems
- OliveTin >= 3000.0.0, < 3000.18.1
- OliveTin: >= 3000.0.0, < 3000.18.1 (Fixed in:
3000.18.1)
Code Analysis
Commit: 4ef86ab
Initial incomplete mitigation replacing literal {{ output }} and {{ exitCode }} tags with environment variables and blocking shellAfterCompleted on webhooks.
Commit: e5d29b6
Complete remediation implementing regex replacement for all template variations of output and exitCode and stripping both keys from the template evaluation context.
Exploit Details
- GitHub: Official regression unit test in service/internal/executor/executor_test.go demonstrating shell breakout via '{{ output }}' and '{{ .Arguments.output }}'.
Mitigation Strategies
- Upgrade OliveTin to version 3000.18.1 or later to enforce environment variable isolation for post-execution output and exit codes.
- Eliminate template interpolation of {{ output }} and {{ .Arguments.output }} inside shellAfterCompleted directives by encapsulating post-processing logic within standalone scripts invoked via exec.
- Restrict network and authentication access to OliveTin instances so that only trusted administrators can trigger actions.
- Prohibit webhook-triggered actions from invoking post-completion shell hooks.
Remediation Steps:
- Audit all OliveTin configuration files (e.g., /etc/OliveTin/config.yaml) for the presence of the 'shellAfterCompleted' directive.
- Upgrade the OliveTin binary or container image to release 3000.18.1 (https://github.com/OliveTin/OliveTin/releases/tag/3000.18.1).
- Update shellAfterCompleted lines in config.yaml to reference "$OUTPUT" and "$EXITCODE" directly without wrapping single quotes around the template placeholder.
- Migrate any webhook-bound actions away from shellAfterCompleted to direct exec scripts, as webhook execution of shellAfterCompleted is blocked in patched versions.
- Restart the OliveTin service and verify action execution logs to confirm post-completion commands run without template expansion errors.
References
- NVD Vulnerability Detail: CVE-2026-75506
- CVE.org Record: CVE-2026-75506
- GitHub Security Advisory: GHSA-vc6p-m6vx-6cwq
- GitHub Pull Request #1070
- GitHub Pull Request #1088
- GitHub Fix Commit 1 (4ef86abee7aac4e4ec4a3200c7ca491ca3501065)
- GitHub Fix Commit 2 (e5d29b68da66fd7f99072d6afd336dee2c28876c)
- OliveTin Release 3000.17.0
- OliveTin Release 3000.18.1
- CVEList V5 Repository Source: CVE-2026-75506.json
Read the full report for CVE-2026-75506 on our website for more details including interactive diagrams and full exploit analysis.

