/

CVE-2026-30223

Severity:

HIGH RISK

(8.8)

Improper Authentication / JWT Validation Flaw

CVE-2026-30223

Analyzed

Vulnerability type

Category:

Improper Authentication / JWT Validation Flaw

CWE:

CWE-287, CWE-345

Impact:

Authentication Bypass and Cross-Service Token Reuse

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OliveTin exposes predefined shell commands through a web interface and supports JWT-based authentication.

In affected versions, the configured JWT audience (authJwtAud) is not enforced, so any validly signed token is accepted regardless of its aud claim, allowing authentication with tokens meant for other services.

Affected context

This vulnerability appears in OliveTin deployments that:

  • Expose the OliveTin web UI to users or other services, and
  • Configure JWT authentication using either authJwtPubKeyPath (RSA public key) or authJwtHmacSecret (HMAC secret), and
  • Rely on authJwtAud to restrict which tokens are valid for OliveTin.

In such environments, OliveTin treats any correctly signed JWT as valid even if the aud (audience) claim does not match the configured authJwtAud, weakening isolation between services that share a signing key.

Exploit preconditions

  • Attack surface: OliveTin HTTP(S) interface where JWT-secured requests are accepted.
  • Required access: Ability to obtain or mint a validly signed JWT from the same issuer used by OliveTin (e.g., another service, shared IdP, or shared signing key).
  • Trigger point: Presentation of a correctly signed JWT whose aud claim is intended for a different audience/service than OliveTin.
  • Why exploitation is possible: During JWT parsing, OliveTin verifies the signature but does not enforce that the aud claim matches the configured authJwtAud, violating the intended audience restriction and allowing cross-audience token reuse.

Why this happens

The core issue is incomplete JWT validation logic: the implementation verifies the token signature but fails to enforce the configured audience claim.

This aligns with CWE-287: Improper Authentication, because the system treats any validly signed token as sufficient proof of authorization, without confirming it was issued for this specific service.

It is also related to CWE-345: Insufficient Verification of Data Authenticity, since only part of the token's semantics are validated (signature) while critical contextual constraints (audience) are ignored.

Abstractly, this represents an authentication pattern where cryptographic validity is checked, but contextual claims (like audience) are not bound to the relying party's configuration, enabling token misuse across services.

Potential impact

  • Attackers may authenticate to OliveTin using JWTs that were issued for a different application or API.
  • Users or services with tokens for another system could gain unintended access to OliveTin's command interface.
  • Cross-service privilege escalation may occur in environments where multiple services share an identity provider or signing keys.
  • Execution of predefined shell commands via the OliveTin interface by unauthorized principals, potentially impacting underlying systems, data, or infrastructure.
  • Confusion and auditing blind spots due to tokens appearing valid even though they were never intended for OliveTin.

General mitigation guidance

Effective mitigation focuses on enforcing full JWT validation semantics and tightening trust boundaries around identity tokens:

  • Treat the audience claim as mandatory and ensure it is compared against a configured, service-specific value before accepting a token.
  • Use distinct signing keys or client IDs for OliveTin, separate from other services, to reduce the blast radius of token misuse.
  • Validate additional contextual claims (e.g., issuer, expiration, and authorized party) to ensure tokens are scoped correctly to OliveTin.
  • Apply least-privilege design: restrict which commands are exposed through OliveTin and map identities to minimal command sets.
  • Prefer secure-by-default configuration where JWT validation, including audience and issuer checks, is enabled and cannot be easily misconfigured or disabled.
  • Document and regularly review the identity and access model for OliveTin, especially in environments using a shared identity provider.

How teams detect issues like this

Organizations can identify this class of JWT validation issues using a combination of code analysis and runtime monitoring:

  • Static analysis and code review:
  • Look for JWT parsing/verification code where the signature is validated but the aud claim is not checked against configuration.
  • Review authentication middleware to confirm that all critical claims (audience, issuer, expiry) are validated before establishing a user session.
  • Use SAST or linters that specifically flag incomplete JWT validation patterns (e.g., missing audience verification).
  • Configuration and policy checks:
  • Enforce security policies requiring explicit audience lists for all services relying on JWTs.
  • Periodically audit OliveTin and related services to confirm they use unique audience values and keys.
  • Runtime monitoring and logging:
  • Log JWT claim values (with care to avoid sensitive data leakage) when authentication is performed, especially aud, iss, and subject identifiers.
  • Detect anomalies such as tokens with unexpected aud values being accepted, or tokens originally issued for other services appearing in OliveTin logs.
  • Automated review tools:
  • Integrate security scanners into CI/CD that model JWT usage patterns and flag endpoints lacking full claim enforcement.

Sources

SourceLink
github.comgithub.com/OliveTin/OliveTin/commit/e97d8ecbd8d6ba468c418ca496fcd18f78131233
github.comgithub.com/OliveTin/OliveTin/releases/tag/3000.11.1
github.comgithub.com/OliveTin/OliveTin/security/advisories/GHSA-g962-2j28-3cg9

Frequently asked

questions

Yes. If OliveTin is accessible over the network and uses JWT authentication, a remote attacker who can obtain validly signed JWTs (for any audience under the same issuer/key) may be able to authenticate to OliveTin without possessing a token specifically issued for it.

The attacker needs access to a valid, correctly signed JWT from the same identity provider or signing key that OliveTin trusts. This could come from another application that uses the same issuer/key, from compromised client secrets, or from any environment where tokens for a different audience are obtainable.

Enforce strict JWT validation that includes:

  • Checking that the aud claim matches a configured, OliveTin-specific value.
  • Verifying the issuer, expiration, and any other relevant claims.

Additionally, use distinct audiences and keys per service so that tokens are not reusable across applications.

Adopt a standard JWT validation abstraction or library that:

  • Requires explicit configuration of expected audience and issuer.
  • Fails closed when required claims are missing or mismatched.

Combine this with security-focused code reviews, automated tests that assert audience enforcement, and architectural guidelines mandating unique audiences and keys for each service relying on JWT-based authentication.

Find out what's already
exploitable in your codebase.