CVE-2026-31817: OliveTin's unsafe parsing of UniqueTrackingId can be used to write files
When the saveLogs feature is enabled, OliveTin persists execution log entries to disk. The filename used for these log files is constructed in part from the user-supplied UniqueTrackingId field in the StartAction API request.
Published Mar 11, 2026
Affected packages
github.com/OliveTin/OliveTin
- Ecosystem
- Go
- Affected
- < 0.0.0-20260309102040-b03af0e2eca3
- Fixed in
- 0.0.0-20260309102040-b03af0e2eca3
- Check
go list -m github.com/OliveTin/OliveTin
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
When the saveLogs feature is enabled, OliveTin persists execution log entries to disk. The filename used for these log files is constructed in part from the user-supplied UniqueTrackingId field in the StartAction API request. This value is not validated or sanitized before being used in a file path, allowing an attacker to use directory traversal sequences (e.g., ../../../) to write files to arbitrary locations on the filesystem.
Affected Code
Entry point — `service/internal/api/api.go` (line 130):
The UniqueTrackingId from the API request is passed directly to the executor without validation:
execReq := executor.ExecutionRequest{
Binding: pair,
TrackingID: req.Msg.UniqueTrackingId, // user-controlled, no validation
// ...
}Tracking ID accepted as-is — `service/internal/executor/executor.go` (lines 508–512):
The tracking ID is only replaced with a UUID if it is empty or a duplicate. Any other string, including one containing path separators, is accepted:
_, isDuplicate := e.GetLog(req.TrackingID)
if isDuplicate || req.TrackingID == "" {
req.TrackingID = uuid.NewString()
}Filename construction — `service/internal/executor/executor.go` (line 1042):
The tracking ID is interpolated directly into the log filename:
filename := fmt.Sprintf("%v.%v.%v",
req.logEntry.ActionTitle,
req.logEntry.DatetimeStarted.Unix(),
req.logEntry.ExecutionTrackingID,
)File write — `service/internal/executor/executor.go` (lines 1068–1069 and 1082–1083):
The filename is joined to the configured log directory using path.Join, which calls path.Clean internally. path.Clean resolves .. path segments, causing the final file path to escape the intended directory:
// Results file (.yaml)
filepath := path.Join(dir, filename+".yaml")
err = os.WriteFile(filepath, data, 0600)
// Output file (.log)
filepath := path.Join(dir, filename+".log")
err := os.WriteFile(filepath, []byte(data), 0600)Proof of Concept
An attacker sends the following StartAction request (Connect RPC or REST):
{
"bindingId": "<any-executable-action-id>",
"uniqueTrackingId": "../../../tmp/pwned"
}Assuming the action title is Ping the Internet and the timestamp is 1741320000, the constructed filename becomes:
Ping the Internet.1741320000.../../../tmp/pwnedWhen path.Join processes this with a configured results directory like /var/olivetin/logs:
path.Join("/var/olivetin/logs", "Ping the Internet.1741320000.../../../tmp/pwned.yaml")path.Clean resolves the traversal:
- Path segments:
["var", "olivetin", "logs", "Ping the Internet.1741320000...", "..", "..", "..", "tmp", "pwned.yaml"] - The
..segments traverse upward past the log directory. - Final resolved path:
/tmp/pwned.yaml
Two files are written:
- `.yaml` file — contains YAML-serialized
InternalLogEntry(action title, icon, timestamps, exit code, output, tags, username, tracking ID) - `.log` file — contains the raw command output (potentially attacker-influenced if the action echoes its arguments)
Impact
- Arbitrary file write to any path writable by the OliveTin process.
- OliveTin frequently runs as root inside Docker containers, so the writable scope is often the entire filesystem.
- An attacker could:
- Overwrite OliveTin's own
sessions.yamlto inject authenticated sessions. - Write to entity file directories to inject malicious entity data.
- Write to system cron directories or other locations to achieve remote code execution.
- Cause denial of service by overwriting critical system files.
Suggested Fix
Validate the UniqueTrackingId to ensure it only contains safe characters before use. A strict UUID format check is the simplest approach:
import "regexp"
var validTrackingID = regexp.MustCompile(`^[a-fA-F0-9\-]+$`)
// In ExecRequest, before accepting the user-supplied ID:
if req.TrackingID == "" || !validTrackingID.MatchString(req.TrackingID) {
req.TrackingID = uuid.NewString()
}Alternatively, sanitize the filename in stepSaveLog by stripping or rejecting path separators and .. sequences.
Credited to iconnnjka.
References
- https://github.com/OliveTin/OliveTin/security/advisories/GHSA-364q-w7vh-vhpc
- https://github.com/OliveTin/OliveTin/commit/2f77000de44f65690f257e3cf8e2c8462b0e74c7
- https://github.com/OliveTin/OliveTin/releases/tag/3000.11.2
- https://nvd.nist.gov/vuln/detail/CVE-2026-31817
- https://github.com/advisories/GHSA-364q-w7vh-vhpc
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-75506
OliveTin: Second-Order OS Command Injection via shellAfterCompleted
medium6.6Nov 18, 2026CVE-2026-67437
OliveTin: Unauthenticated DoS via OAuth2 State Memory Exhaustion (Unbounded Map Growth)
high7.5Jul 30, 2026CVE-2026-67438
OliveTin OS Command Injection via Custom regex: Argument Type Bypassing Shell Safety Check
medium6.6Jul 30, 2026CVE-2026-67439
OliveTin: StartActionAndWait Endpoints Bypass `logs` Permission and Return Action Output
medium4.3Jul 30, 2026CVE-2026-48708
OliveTin has a Concurrent Template Parsing Race Condition which Leads to Cross-Request Command Contamination
high7.5Jun 24, 2026CVE-2026-48709
OliveTin: ValidateArgumentType API Endpoint's Missing Authentication Allows Action and Argument Enumeration
low3.7Jun 24, 2026
