/

CVE-2026-31946

Severity:

CRITICAL RISK

(9.8)

Authentication and Token Validation Flaws in OpenOlat

CVE-2026-31946

Analyzed

Vulnerability type

Category:

Authentication and Token Validation Flaws

CWE:

CWE-287, CWE-347

Impact:

Authentication Bypass and Unauthorized Access

Severity:

CRITICAL RISK

(9.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

OpenOlat's OpenID Connect implicit flow incorrectly accepts JSON Web Tokens (JWTs) without verifying their cryptographic signatures, trusting only claim-level fields such as issuer, audience, state, and nonce.

An attacker who can craft or intercept authentication responses may forge access tokens or ID tokens that appear valid to OpenOlat, potentially gaining unauthorized access or escalating privileges within the e-learning platform.

Affected context

This vulnerability affects OpenOlat deployments using OpenID Connect (OIDC) implicit flow between versions 10.5.4 and before 20.2.5.

The issue occurs in the token handling logic where the platform parses compact JWTs (header.payload.signature) with JSONWebToken.parse() and then relies solely on claim verification through getAccessToken() methods in OpenIdConnectApi and OpenIdConnectFullConfigurableApi.

No cryptographic signature validation is performed against the Identity Provider's JSON Web Key Set (JWKS), so any syntactically valid JWT with expected claims can be accepted as authentic.

Exploit preconditions

  • Attack surface: The OpenID Connect authentication endpoints and callback/redirect URIs exposed by the OpenOlat application.
  • Required access: Ability to send or influence OIDC responses to OpenOlat's redirect URI (e.g., via a malicious client, compromised IdP integration, man-in-the-middle in some setups, or by directly targeting the callback endpoint).
  • Trigger point: The moment OpenOlat processes an incoming JWT (ID token or access token) during OIDC implicit flow and calls JSONWebToken.parse() followed by getAccessToken() without signature verification.
  • Why exploitation is possible: The JWT parser discards the signature segment and the subsequent logic validates only non-cryptographic fields (issuer, audience, state, nonce), so a forged token with expected claims is treated as legitimate without proof that it was issued by the trusted Identity Provider.

Why this happens

The core issue is the absence of cryptographic signature validation for JWTs in the OpenID Connect implicit flow, mapping to CWE-347: Improper Verification of Cryptographic Signature.

The JSONWebToken.parse() function ignores the signature portion of the compact JWT format, effectively treating the token as an unsigned JSON payload.

Higher-level methods (getAccessToken() in OpenIdConnectApi and OpenIdConnectFullConfigurableApi) then validate only claim-based attributes—such as issuer, audience, and nonce—without checking that the token was signed using a key from the Identity Provider's JWKS endpoint.

In abstract terms, this is an authentication design flaw where the system bases trust solely on self-asserted metadata inside the JWT rather than on a verifiable signature, enabling attackers to fabricate tokens that satisfy claim checks but are not genuinely issued by the IdP.

This also intersects with CWE-287: Improper Authentication, because the system effectively authenticates users based on unverifiable tokens.

Potential impact

  • Attackers could forge ID tokens or access tokens to impersonate arbitrary users.
  • Unauthenticated users may gain access to protected OpenOlat resources as if they were legitimately authenticated.
  • Privilege escalation may occur if attackers craft tokens that represent higher-privilege accounts (e.g., instructors or administrators).
  • Session fixation or account takeover scenarios could be enabled by binding forged tokens to existing sessions.
  • Compromise of grading data, course materials, and personal information stored within the e-learning platform.
  • Use of the compromised OpenOlat instance as a stepping stone to attack integrated systems that trust its authentication state.

General mitigation guidance

Effective mitigation focuses on enforcing full cryptographic verification of all JWTs processed as part of OpenID Connect flows and tightening trust boundaries around identity assertions.

Recommended defensive patterns include:

  • Mandatory signature verification: Ensure every JWT (ID token and access token when used as a bearer assertion) is validated against the Identity Provider's JWKS or configured signing key, including algorithm and key identifier checks.
  • Algorithm and key whitelisting: Restrict accepted JWT algorithms to strong asymmetric or symmetric algorithms agreed upon with the IdP; reject tokens using none or unexpected algorithms.
  • End-to-end validation pipeline: Treat claim checks (issuer, audience, nonce, expiry) as secondary to signature validation, never as a substitute for it.
  • Secure token parsing APIs: Use JWT libraries that do not allow parsing tokens without verification by default, or that require explicit verification parameters and fail closed.
  • Defense-in-depth for authentication: Combine token verification with additional controls such as enforced TLS, strict redirect URI validation, and CSRF/state protections in OIDC flows.
  • Least-privilege account design: Structure roles and permissions so that even if a single account is abused, the blast radius remains limited.

How teams detect issues like this

Organizations can detect similar vulnerabilities by focusing on how tokens are parsed and validated in authentication logic.

High-level approaches include:

  • Static analysis patterns:
  • Flag calls to JWT parsing methods that do not pass verification keys, algorithms, or validation parameters.
  • Detect token validation code paths that inspect claims but never invoke signature verification APIs.
  • Identify any acceptance of JWTs where the alg is none or where algorithm negotiation is influenced by untrusted input.
  • Code review signals:
  • Authentication or SSO modules using parse()/decode() methods without explicit verification flags.
  • Custom token validation logic that manually checks issuer, audience, or expiration but lacks cryptographic checks.
  • Comments or configuration that imply "lightweight" or "performance-optimized" token processing in auth flows.
  • Runtime and policy enforcement:
  • Security tests that attempt login with forged unsigned tokens and verify whether the application accepts them.
  • Integration tests for SSO flows that explicitly validate rejection of tampered tokens (modified payload with mismatched signature).
  • Use of automated SAST/DAST tools configured with rules for JWT misconfiguration and missing signature verification patterns.

Sources

SourceLink
github.comgithub.com/OpenOLAT/OpenOLAT/security/advisories/GHSA-v8vp-x4q4-2vch

Frequently asked

questions

The vulnerability can affect any OpenOlat deployment using the OpenID Connect implicit flow in the impacted versions, especially when exposed to the internet. Exploitability increases significantly if an attacker can directly interact with the OIDC callback endpoint, control an OIDC client configuration, or interfere with communication between the Identity Provider and OpenOlat.

The attacker needs the ability to send or influence OIDC authentication responses received by OpenOlat. This could be achieved by operating a malicious or misconfigured OIDC client, crafting requests to the redirect URI, or in some environments by being able to intercept and modify responses in transit. Direct access to the application or network-level control is not always required if the callback endpoint is reachable and insufficiently constrained.

The safest approach is to enforce strict JWT signature verification for all ID tokens and access tokens before treating them as valid credentials. This means using a JWT library that requires verification keys, validating against the Identity Provider's JWKS, restricting accepted algorithms, and treating any failure in signature or claim validation as a hard authentication failure.

Future designs should adopt a "verify by default" mindset for all tokens: only accept identity assertions that have been cryptographically validated. Standardize on well-maintained OIDC and JWT libraries that encapsulate best practices, include automated tests that attempt to authenticate with tampered or unsigned tokens, and subject all authentication and SSO code to focused security reviews. Additionally, maintaining clear architectural guidelines and security checklists for integrating external IdPs can help avoid bypassing critical verification steps.

Find out what's already
exploitable in your codebase.