8.5high
OliveTin's unsafe parsing of UniqueTrackingId can be used to write files
- Severity
- 8.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.81% (higher than 58% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-364q-w7vh-vhpcGO-2026-4670
Description
OliveTin gives access to predefined shell commands from a web interface. Prior to 3000.11.2, 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. This vulnerability is fixed in 3000.11.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| OliveTin OliveTin | < 3000.11.2, before 3000.11.2 | CVE List, NVD |
| github.com/OliveTin/OliveTin (Go) | before 0.0.0-20260309102040-b03af0e2eca3 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 8.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:L |
| GitHub | 8.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:L |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
OliveTin gives access to predefined shell commands from a web interface. Prior to 3000.11.2, 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. This vulnerability is fixed in 3000.11.2.
GitHub Advisory Database
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/pwned
When 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:
.yamlfile — contains YAML-serializedInternalLogEntry(action title, icon, timestamps, exit code, output, tags, username, tracking ID).logfile — 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.
- Overwrite OliveTin's own
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.
Go Vulnerability Database
OliveTin's unsafe parsing of UniqueTrackingId can be used to write files in github.com/OliveTin/OliveTin
NVD (es)
OliveTin da acceso a comandos shell predefinidos desde una interfaz web. Antes de la versión 3000.11.2, cuando la función saveLogs está habilitada, OliveTin persiste las entradas del registro de ejecución en el disco. El nombre de archivo utilizado para estos archivos de registro se construye en parte a partir del campo UniqueTrackingId proporcionado por el usuario en la solicitud de la API StartAction. Este valor no se valida ni se sanea antes de ser utilizado en una ruta de archivo, lo que permite a un atacante utilizar secuencias de salto de directorio (por ejemplo, ../../../) para escribir archivos en ubicaciones arbitrarias del sistema de archivos. Esta vulnerabilidad se corrige en la versión 3000.11.2.
References
| https://github.com/OliveTin/OliveTin/security/advisories/GHSA-364q-w7vh-vhpc | advisory, exploit, mitigation, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-31817 | advisory | |
| https://github.com/OliveTin/OliveTin/commit/2f77000de44f65690f257e3cf8e2c8462b0e74c7 | fix, web | |
| https://github.com/OliveTin/OliveTin | package | |
| https://github.com/OliveTin/OliveTin/releases/tag/3000.11.2 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-31817 changed 2026-03-11 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-364q-w7vh-vhpc changed 2026-03-23 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4670 changed 2026-03-23 | CC-BY-4.0 |
| NVD | CVE-2026-31817 changed 2026-06-17 | Public domain |