/

CVE-2026-128047

Severity:

HIGH RISK

(8.1)

Weak Randomness (CWE-330) in OpenMage Token Generation

CVE-2026-128047

Deferred

Vulnerability type

Category:

Insufficiently Random Values

CWE:

CWE-330

Impact:

Account Takeover

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

OpenMage generates customer confirmation keys and password-reset tokens using predictable, non-cryptographic functions. An unauthenticated attacker may brute-force a customer confirmation key through an unrate-limited endpoint, or may predict administrator reset tokens after recovering the generator state.

Affected context

The issue affects OpenMage Magento-LTS releases before 20.18.2 and 21.0.0-beta pre-releases before 21.0.0-beta3. It arises in customer email-confirmation and customer or administrator password-reset token generation. Risk depends on the relevant endpoints being reachable and, for administrator reset-token prediction, on an attacker being able to recover the token generator state.

Exploit preconditions

  • Attack surface: Customer confirmation and password-reset flows
  • Required access: No authentication is needed to attempt confirmation-key brute force; administrator token prediction additionally depends on recovering generator state
  • Trigger point: The customer confirmation endpoint, or an administrator password-reset flow
  • Why exploitation is possible: Confirmation keys have roughly 20 bits of uncertainty and the endpoint is unrate-limited; reset tokens rely on non-cryptographic generators that may be predictable

Why this happens

The application uses md5(uniqid()) for customer email-confirmation keys and uniqHash() for customer and administrator password-reset tokens. These are not suitable cryptographic random generators for security-sensitive tokens. This maps to CWE-330: Use of Insufficiently Random Values, because attackers may guess or predict tokens used to authorize account-related actions.

Potential impact

  • An attacker could confirm a pending customer account and log in as that customer
  • An attacker may be able to reset customer passwords
  • An attacker who recovers generator state could predict administrator reset tokens and take over an administrator account
  • Account compromise could enable access to customer data or administrative functions

General mitigation guidance

Defensive patterns for token generation include:

  • Generate security-sensitive tokens with a cryptographically secure random number generator and sufficient entropy
  • Use purpose-specific, unpredictable tokens and validate them only in their intended flow
  • Apply rate limits, attempt limits, and monitoring to confirmation and reset endpoints
  • Expire tokens promptly, invalidate them after use, and avoid exposing token-generation state
  • Restrict account and administrative privileges to the minimum needed, and require additional protections for sensitive actions

How teams detect issues like this

Review token-generation code for time-based, sequential, hash-based, or otherwise non-cryptographic sources of randomness. Use static analysis and code review checks to flag such APIs in authentication, confirmation, and password-reset flows. Also assess endpoint policies for rate limits, attempt limits, token expiry, and single-use enforcement; automated security review tools may help identify risky patterns.

Sources

SourceLink
github.comgithub.com/OpenMage/magento-lts/commit/4a8d91c692524de4a07e70af5367b6cb67a9516d
github.comgithub.com/OpenMage/magento-lts/commit/9f5a1c3cf63f5cf6ac9f90b041a97a474cea04c2
github.comgithub.com/OpenMage/magento-lts/security/advisories/GHSA-7j66-6mw7-rgfx
vulncheck.comvulncheck.com/advisories/openmage-magento-lts-before-20.18.2-account-takeover-via-predictable-confirmation-key

Frequently asked

questions

Customer confirmation-key brute force can be attempted without authentication through the unrate-limited confirmation endpoint. Administrator reset-token prediction has the additional condition that the attacker recovers generator state.

No account is required to attempt the confirmation-key attack. The administrator-token attack depends on the ability to infer or recover the state used by the weak token generator.

Use a cryptographically secure random generator with sufficient entropy for confirmation and password-reset tokens.

Review randomness sources used in security-sensitive flows, enforce rate limits and token lifecycle controls, and include checks for predictable-token patterns in code review and automated analysis.

Find out what's already
exploitable in your codebase.