Описание
OliveTin: StartActionAndWait Endpoints Bypass logs Permission and Return Action Output
Summary
The synchronous execution RPCs StartActionAndWait and StartActionByGetAndWait return the full LogEntry for the just-executed action without checking whether the caller is allowed to read that action's logs.
OliveTin's ACL model separates exec from logs. A deployment can intentionally allow a user to run an action while denying access to its historical or live output. That separation is enforced in GetLogs, GetActionLogs, ExecutionStatus, and EventStream, but it is not enforced in the synchronous ...AndWait endpoints.
As a result, any user who can execute an action through these endpoints can read the action output immediately even when the action's ACL explicitly sets logs:false.
Details
OliveTin defines separate per-action permissions:
The normal log and streaming paths correctly enforce logs permission:
That check is used by:
GetLogsGetActionLogsExecutionStatusEventStream
However, the synchronous execution endpoints directly return the created LogEntry without any logs ACL check:
And internalLogEntryToPb() includes the full output:
The executor separately enforces exec permission, but there is no subsequent check that the response should omit or deny Output when logs:false.
Local Reproduction
I verified this locally with a one-off test against the real StartActionAndWait handler.
Configuration used:
- action
secret_actionwith shellecho SECRET_FROM_ACTION - user
lowmatched by ACL:exec: truelogs: falseview: falsekill: false
Then I invoked StartActionAndWait as low through the real handler path using header-based auth.
Observed output from the test run:
The UTF-16LE formatting is from Windows echo, but the key result is that the response returned the real command output even though the caller's ACL explicitly denied log access.
Impact
- Bypass of log confidentiality controls: Operators may configure actions to be executable but not log-readable. The
...AndWaitendpoints break that separation. - Disclosure of secrets printed by actions: Many OliveTin actions wrap administrative scripts and commands whose stdout/stderr may contain credentials, internal paths, hostnames, tokens, or sensitive operational data.
- Adjacent to previous output-leak bugs: OliveTin already had an EventStream output disclosure bug. This is a separate response-path authorization gap on the synchronous execution APIs.
Recommended Fix
Enforce logs permission before returning LogEntry content from synchronous execution endpoints.
Two reasonable fixes:
- Deny the endpoint response when
logs:false
- Or redact log-bearing fields when
logs:false
The same fix should be applied to both:
StartActionAndWaitStartActionByGetAndWait
References
service/internal/api/api.goservice/internal/config/config.goservice/internal/acl/acl.go
Пакеты
github.com/OliveTin/OliveTin
< 0.0.0-20260708085316-e421780c9885
0.0.0-20260708085316-e421780c9885
Связанные уязвимости
OliveTin gives safe and simple access to predefined shell commands from a web interface. Prior to 3000.17.0, the service/internal/api/api.go StartActionAndWait and StartActionByGetAndWait endpoints return full LogEntry output after execution without enforcing the logs permission, allowing a user with exec permission but logs:false to read action output. This issue is fixed in version 3000.17.0.