/

CVE-2026-123816

Severity:

HIGH RISK

(8.1)

Authentication Bypass (CWE-287) in pyLoad API Keys

CVE-2026-123816

Deferred

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Unauthorized API access with the permissions of a cached key owner

Severity:

HIGH RISK

(8.1)

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

pyLoad's API key validation can accept a forged key when its attacker-controlled identifier matches a legitimate key whose validation result is cached. An unauthenticated remote attacker who identifies an active key ID may inherit the associated user's permissions while that cache entry remains valid.

Affected context

The issue occurs in pyLoad's API key validation when a successful validation is cached using only the key ID. If a legitimate key has populated the cache, a forged key with the same identifier may take the cache-hit path without the normal hash comparison. The described cache lifetime is 300 seconds.

Exploit preconditions

  • Attack surface: pyLoad's remotely accessible API
  • Required access: No valid API key is required; the attacker must be able to reach the API and identify an active key ID.
  • Trigger point: A forged API key is checked while a legitimate key with the same ID has a successful cache entry.
  • Why exploitation is possible: The cache lookup uses the key ID without verifying the forged key material against the stored hash on a cache hit.

Why this happens

The validation cache is keyed only by an attacker-controlled identifier, and a cache hit bypasses the comparison between the presented key material and the stored hash. This is an authentication validation flaw mapped to CWE-287: Improper Authentication: possession of a matching identifier is treated as sufficient evidence of identity.

Potential impact

  • An attacker may gain API access without possessing the corresponding secret key.
  • The attacker could perform actions permitted to the cached key owner.
  • Depending on the owner's permissions, this may enable unauthorized changes or access to protected data.
  • Access may persist for the lifetime of the relevant cache entry.

General mitigation guidance

Defensive patterns focus on ensuring that cached results cannot replace verification of credentials.

  • Bind cache entries to the complete credential or to a cryptographically strong, non-reversible credential fingerprint, not an identifier alone.
  • Ensure authentication checks compare presented and stored credential material on every relevant path, including cache hits.
  • Use unpredictable identifiers and avoid treating identifiers as proof of authentication.
  • Limit the permissions associated with API credentials and apply least privilege.
  • Use bounded cache lifetimes and provide a way to invalidate entries when credentials change or are revoked.

How teams detect issues like this

  • Use static analysis and code review to find authentication caches keyed only by user-controlled identifiers.
  • Check that cache-hit paths preserve the same credential verification guarantees as cache-miss paths.
  • Review API authentication tests for forged credentials that reuse valid identifiers.
  • Apply policies requiring secure credential comparison and appropriate cache-key design.
  • Monitor for repeated authentication attempts involving sequential or otherwise enumerable identifiers.

Sources

SourceLink
github.comgithub.com/pyload/pyload/commit/00d1372510f915f843b1574a3f1b28fbb724a42e
github.comgithub.com/pyload/pyload/security/advisories/GHSA-r44w-v6gf-x3p6

Frequently asked

questions

The described issue is reachable through pyLoad's API. Exploitation requires identifying an active key ID and a matching legitimate key validation being present in the cache.

No valid key is required according to the description. The attacker does need to reach the API and identify an active key ID.

Do not let a cache hit stand in for credential verification. Bind cached authentication results to the complete credential or a secure fingerprint of it, and preserve verification on every authentication path.

Treat identifiers as lookup hints rather than proof of identity, test cache-hit paths with forged credentials, and review authentication caching for keys based only on attacker-controlled values.

Find out what's already
exploitable in your codebase.