OliveTin CVE-2026-53541
MEDIUMSeverity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
Network-reachable API requires low-privilege authentication; integrity impact is limited to environment variable injection with no confirmed direct code execution, no confidentiality or availability impact, and no scope change.
Primary rating from Vendor (https://github.com/OliveTin/OliveTin).
CVSS VectorVendor: https://github.com/OliveTin/OliveTin
Lifecycle Timeline
2DescriptionCVE.org
Description
The filterToDefinedArgumentsOnly function in the executor is intended to discard any arguments not explicitly defined in the action's configuration. However, a special case allows any argument whose name starts with ot_ to bypass this filter. While two system arguments (ot_executionTrackingId and ot_username) are injected by OliveTin and overridden, all other ot_-prefixed arguments supplied by the user pass through unmodified.
These bypassed arguments are:
- Not type-checked - the validation loop only iterates over the action's defined arguments, so
ot_-prefixed arguments skip all type safety checks entirely. - Set as environment variables - via
buildEnv(), with completely unvalidated values, and passed to the executed command. - Included in the template context - available as
.Arguments.ot_*in template rendering.
Affected Code
Filter bypass - service/internal/executor/executor.go (lines 728-731):
func keepArgument(name string, definedNames map[string]struct{}) bool {
_, ok := definedNames[name]
return ok || strings.HasPrefix(name, "ot_")
}System args only override two keys - service/internal/executor/executor.go (lines 742-745):
func injectSystemArgs(req *ExecutionRequest) {
req.Arguments["ot_executionTrackingId"] = req.TrackingID
req.Arguments["ot_username"] = req.AuthenticatedUser.Username
}Any other ot_-prefixed argument (e.g., ot_malicious) survives both functions.
Unvalidated values become environment variables - service/internal/executor/executor.go (lines 867-882):
func buildEnv(args map[string]string) []string {
ret := append(os.Environ(), "OLIVETIN=1")
for k, v := range args {
varName := fmt.Sprintf("%v", strings.TrimSpace(strings.ToUpper(k)))
if varName == "" { continue }
ret = append(ret, fmt.Sprintf("%v=%v", varName, v))
}
return ret
}The value v is never validated. It can contain newlines, shell metacharacters, null bytes, or any arbitrary data.
Proof of Concept
An attacker sends a StartAction request with extra ot_-prefixed arguments:
{
"bindingId": "<any-action-id>",
"arguments": [
{ "name": "ot_custom_var", "value": "arbitrary unvalidated content \n with newlines" },
{ "name": "ot_another", "value": "$(whoami)" }
]
}These arguments:
- Pass through
filterToDefinedArgumentsOnly(theot_prefix exempts them). - Are never type-checked (not in the action's argument definitions).
- Become environment variables
OT_CUSTOM_VARandOT_ANOTHERin the executed command's environment. - Are available in the template rendering context as
.Arguments.ot_custom_varand.Arguments.ot_another.
Impact
- Environment variable pollution - attacker can set arbitrary environment variables (with
OT_uppercased prefix) in the execution environment of any action they can trigger. Scripts or programs that read custom environment variables could be influenced. - Potential for secondary exploitation - if any executed script or command reads
OT_-prefixed environment variables, the unvalidated content could cause unexpected behavior. - Template context pollution - although Go's
text/templatedoes not recursively evaluate data values (mitigating direct template injection), the extra arguments are accessible in the template context and could interact unexpectedly with custom template logic.
Suggested Fix
Remove the ot_ prefix exception from keepArgument, or restrict it to only the two known system arguments:
var systemArgs = map[string]struct{}{
"ot_executionTrackingId": {},
"ot_username": {},
}
func keepArgument(name string, definedNames map[string]struct{}) bool {
_, isDefined := definedNames[name]
_, isSystem := systemArgs[name]
return isDefined || isSystem
}---
Discovery Methodology
Both vulnerabilities were identified through manual source code review of the OliveTin repository, focusing on:
- Input validation boundaries (API request fields flowing into file system operations and execution contexts)
- Argument filtering and type-checking logic in the executor
- File path construction in the log persistence feature
No automated scanners or fuzzing tools were used. The review was conducted against the current main branch source code.
---
AnalysisAI
Unvalidated ot_-prefixed argument injection in OliveTin allows any authenticated user with action-trigger access to bypass input filtering, inject arbitrary environment variables into action execution contexts, and pollute Go template rendering data. All OliveTin versions prior to commit ebffd9f040f7 (Go pseudo-version < 0.0.0-20260531214440-ebffd9f040f7) are affected. While direct standalone RCE is not confirmed, a public proof-of-concept exists in GHSA-prj9-97mp-mwh2 and secondary command injection is achievable wherever triggered action scripts consume OT_-prefixed environment variables in shell-unsafe ways.
Technical ContextAI
OliveTin is a Go-based self-hosted web UI for running predefined shell commands and scripts. The executor's filterToDefinedArgumentsOnly function uses keepArgument() to enforce an argument allowlist - but contains an over-broad exception: any argument name beginning with ot_ is unconditionally passed through, originally intended only for the two system-injected arguments ot_executionTrackingId and ot_username. Because the type-safety validation loop iterates only over action-defined arguments, all additional ot_-prefixed user-supplied values entirely bypass type checking (CWE-20: Improper Input Validation). These unchecked values then flow through buildEnv() at executor.go lines 867-882, which performs no sanitization - permitting newlines, shell metacharacters, null bytes, or any arbitrary content to be set as OT_-uppercased environment variables in the execution context of any triggered action. The affected CPE is pkg:go/github.com_olivetin_olivetin for versions before pseudo-version 0.0.0-20260531214440-ebffd9f040f7.
RemediationAI
Update OliveTin to a build at or after commit ebffd9f040f791208aee1db2e5a8aecd1e3e603d (Go pseudo-version 0.0.0-20260531214440-ebffd9f040f7), available from the upstream repository at https://github.com/OliveTin/OliveTin. The patch replaces the over-broad ot_ prefix pass-through with an explicit allowlist of exactly the two legitimate system arguments, adds startup-time config validation that fatally rejects any user-defined action argument whose name begins with the reserved ot_ prefix, and introduces a new shell_safe_identifier argument type for safer username-style inputs. If immediate patching is not possible, restrict access to OliveTin's StartAction API endpoint to a tightly controlled set of trusted, known-good users via network-layer controls or stricter authentication enforcement - note this compensating control reduces attacker surface but does not eliminate the flaw, and any authenticated user retains the ability to exploit it.
Same weakness CWE-20 – Improper Input Validation
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
Share
External POC / Exploit Code
Leaving vuln.today
GHSA-prj9-97mp-mwh2