/

CVE-2026-25222

Severity:

HIGH RISK

(7.5)

Information Exposure Through Side-Channel in PolarLearn

CVE-2026-25222

Analyzed

Vulnerability type

Category:

Information Exposure Through Side-Channel

CWE:

CWE-200

Impact:

User Enumeration and Information Exposure

Severity:

HIGH RISK

(7.5)

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

A timing side-channel in PolarLearn's sign-in endpoint allows attackers to infer whether a specific email address is registered on the platform based on response time differences.

Because the server performs expensive Argon2 password hashing only for existing users, unauthenticated attackers can distinguish valid accounts from non-existent ones, enabling targeted user enumeration.

Affected context

This vulnerability occurs in the authentication logic of PolarLearn's sign-in endpoint where the backend:

  • Looks up a user by email, and
  • Runs Argon2 password hashing only when the user record exists.

The observable latency difference between requests for existing users (~650ms) and non-existent users (~160ms) can be measured over the network.

Any deployment that exposes this sign-in endpoint to the internet without additional rate limiting, noise, or constant-time behavior may be affected.

Exploit preconditions

  • Attack surface: Public sign-in/login HTTP endpoint.
  • Required access: No authentication required; only the ability to send repeated login requests and measure response times.
  • Trigger point: Submitting login attempts with arbitrary email addresses to the sign-in endpoint.
  • Why exploitation is possible: The application performs expensive Argon2 hashing only when a user exists, causing a consistent and measurable timing gap between existing and non-existing accounts. This data-dependent processing path creates a side-channel that leaks whether an email is registered.

Why this happens

The underlying issue is differential processing based on whether a user exists, which maps to CWE-200: Exposure of Sensitive Information to an Unauthorized Actor via a timing side-channel.

In the vulnerable pattern, the authentication flow:

  • Performs a cheap early exit for non-existent users, and
  • Performs expensive Argon2 hashing only for existing users.

Because these code paths have significantly different and stable runtimes, an attacker can infer the existence of accounts without any direct information disclosure in the HTTP response.

This reflects a broader bug class where control flow and computation cost depend on sensitive state (e.g., account existence, secret validity) without being equalized, allowing remote timing analysis.

Potential impact

  • Attackers may enumerate which email addresses are registered on the platform.
  • Targeted attacks such as credential stuffing or password spraying can become more efficient by focusing only on known-valid accounts.
  • Increased risk of spear-phishing and social engineering against confirmed platform users.
  • Privacy exposure of user membership, which may be sensitive in certain contexts (e.g., educational or corporate environments).

General mitigation guidance

Effective mitigation focuses on removing data-dependent timing differences and reducing the value of user existence information:

  • Normalize the authentication code path so that both existing and non-existing users incur similar computational cost (e.g., always run a dummy Argon2 hash on a constant value even when the user is not found).
  • Use constant-time comparison functions for password verification and other secret checks to avoid additional micro-timing leaks.
  • Avoid exposing explicit or implicit account existence signals in error messages, logs, or status codes; return uniform responses for failed sign-in attempts.
  • Introduce application-level defenses such as rate limiting, IP throttling, and behavioral detection to make high-volume timing probes harder.
  • Where possible, implement privacy-conscious workflows (e.g., email-based magic links or unified "check your email" flows) that do not reveal account existence during interactive login.

How teams detect issues like this

Detection typically combines code-level review with behavioral analysis:

  • Static/code review: Look for authentication flows where:
  • User lookup and password verification follow different code paths depending on existence.
  • Expensive hashing or crypto operations are skipped for non-existent users.
  • Error handling differs for "user not found" vs. "wrong password".
  • Architectural review: Examine authentication modules for any logic that branches based on sensitive state and may change latency, execution count, or resource usage.
  • Dynamic testing: Use automated probes or security testing tools to:
  • Measure response time distributions for known-existing and guaranteed non-existing accounts.
  • Identify statistically significant timing differences that correlate with account existence.
  • Policy enforcement: Establish coding standards that require constant-time or cost-normalized authentication paths, and enforce them through code review checklists or automated linting where feasible.

Sources

SourceLink
github.comgithub.com/polarnl/PolarLearn/commit/6c276855172c7310cce0df996cb47ffe0d886741
github.comgithub.com/polarnl/PolarLearn/security/advisories/GHSA-wcr9-mvr9-4qh5

Frequently asked

questions

Yes. An unauthenticated attacker over the network can exploit this by sending repeated login requests and measuring response times, without needing any prior access.

Only network access to the public sign-in endpoint is required. The attacker does not need valid credentials or an existing account.

The most robust pattern is to normalize authentication behavior so that both existing and non-existing users follow indistinguishable execution paths and costs. For example, always perform a fixed-cost Argon2 hash and return a generic failure message, regardless of whether the account exists.

Design authentication and secret-handling code to avoid branching, early exits, or varying computation based on sensitive values or existence checks. Use constant-time operations where possible, apply uniform error responses, and incorporate timing-resistance as a standard requirement in security reviews and testing.

Find out what's already
exploitable in your codebase.