CVE-2026-128047: Weak Token Generation in OpenMage & Legacy Magento 1.x (GHSA-7j66-6mw7-rgfx)
CVSS 8.1 High
GHSA-7j66-6mw7-rgfx
CWE-330: Insufficient Entropy
Magento 1.x (EOL) / OpenMage < 20.18.2
Published by VulnCheck on November 13, 2026 (tracking GHSA-7j66-6mw7-rgfx), this vulnerability stems from predictable token generation in legacy Magento 1 codebases. OpenMage users have an official upstream patch in v20.18.2; CrawlShield's value is for stores still on original Magento 1.x that cannot migrate to OpenMage.
Provided as is, test before deploying
Guidance and workarounds on this page are provided as is, without warranty. Test all configuration or code changes in a staging environment before deploying to production. Unverified DIY source diffs have been withheld until tested directly against the affected Magento 1.x versions.
1. Affected Environments & Upstream Patch Scope
- OpenMage (Upstream Fix Available): Affects
openmage/magento-ltsversions prior to20.18.2and21.0.0-betapre-releases prior to21.0.0-beta3. OpenMage maintainers released an official fix in v20.18.2 (as well as20.19.0and21.0.0-beta3), so OpenMage users should upgrade upstream. - Original Magento 1.x (CrawlShield Scope): Unpatched original Magento 1.x (Community and Enterprise editions, end-of-life since June 2020) uses the same legacy token generation routines and receives no official upstream patches. Sites that cannot move to OpenMage require backported remediation.
- Attack Vector & Impact: Unauthenticated HTTP requests to confirmation and password-reset endpoints can allow brute-forcing of pending customer email confirmation keys (taking over unconfirmed accounts) or prediction of customer and administrator password-reset tokens if generator state is recovered.
2. Technical Root Cause
In legacy Magento 1.x and pre-patch OpenMage, security-sensitive tokens were generated using non-cryptographic primitives instead of a CSPRNG:
- Customer email confirmation keys:
Mage_Customer_Model_Customer::getRandomConfirmationKey()returnedmd5(uniqid()). Becauseuniqid()is derived from the system clock in seconds and microseconds, observing the generation second (for instance via HTTP response timing or headers) narrows the key space to roughly 20 bits.Mage_Customer_AccountController::confirmAction()verifies the key via an unauthenticated GET request with sequential customer IDs and no built-in rate limit. - Password-reset tokens:
Mage_Core_Helper_Data::uniqHash()(used byMage_Customer_Helper_Data::generateResetPasswordLinkToken()andMage_Admin_Helper_Data::generateResetPasswordLinkToken()) relied onmd5(uniqid(microtime() . mt_rand(), true)), which is not cryptographically secure. - Additional affected helpers:
Mage_Customer_Helper_Data::generateResetPasswordLinkCustomerId()andMage_Newsletter_Model_Subscriber::randomSequence()also used non-cryptographic randomness.
3. Remediation & Operational Workarounds
- If you run OpenMage: Upgrade directly to OpenMage LTS v20.18.2,
20.19.0, or21.0.0-beta3or later, which replace weak generators withrandom_bytes()CSPRNG generation and constant-timehash_equals()checks. - If you run original Magento 1.x: Because PHP runtime constraints (such as PHP 5.6 or 7.0) and custom extensions vary widely across Magento 1.x deployments, unverified DIY source diffs are held back here. Apply the following temporary operational mitigations while scheduling a tested backport:
- Rate-limit confirmation endpoints: Enforce strict WAF or web-server rate limiting and alerting on repeated requests to
/customer/account/confirm/and password-reset endpoints. - Restrict admin access: Limit access to the Magento admin URL and admin password-reset routes using an IP allowlist or VPN.
- Purge stale unconfirmed accounts: Upgrading or patching token generation does not replace keys already stored on existing pending customer accounts. Review and purge stale unconfirmed accounts or invalidate their stored keys.
Still Running Original Magento 1.x in Production?
If your store is still on original Magento 1.x and cannot migrate to OpenMage, CrawlShield provides tested backport fixes tailored to your PHP version and custom modules, along with audit documentation.
Request Magento 1.x security coverage