Summary
CVE-2026-94107 is a weak-randomness vulnerability (CWE-338) in NivoCart, an open-source PHP shopping cart application, affecting all versions through 2.4.0. The administrator password reset feature generates recovery tokens using a predictable, non-cryptographic method, and stores them without any expiration, allowing an attacker who knows an administrator’s email address to predict or brute-force a valid reset token and take over the admin account. The issue has a CVSS v3.1 base score of 8.1 (High) and a CVSS v4.0 base score of 9.2 (Critical).
Technical details
- Root cause: The
forgotten.phpcontroller (upload/admin/controller/common/forgotten.php, line 24) generates the password reset token usingsubstr(md5(mt_rand()), 0, 10).mt_rand()is a non-cryptographic PRNG seeded from a 32-bit state, and truncating the resulting MD5 hash to 10 hex characters further reduces the effective entropy space, making the token feasible to predict or brute-force. - Trigger conditions: Token validation in
upload/admin/model/user/user.php(getUserByCode, line 119) only checks that a stored code is non-empty — it does not verify a timestamp or expiration, so any previously issued token remains valid indefinitely until it is used. - Attack vector: Network-based, no authentication or user interaction required beyond knowledge of a valid administrator email address. There is no rate-limiting on the reset request or token redemption endpoints, allowing repeated guesses/brute force attempts.
- Impact: A remote attacker who knows (or discovers) an admin’s email can request a password reset and then predict or brute-force the low-entropy token to reset the administrator’s password, resulting in full administrative account takeover of the NivoCart storefront/admin panel.
Affected software
- NivoCart versions 0 through 2.4.0 (
pkg:composer/nivocart/nivocart)
Severity
- CVSS v3.1 Base Score: 8.1 (High) —
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS v4.0 Base Score: 9.2 (Critical) —
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Mitigation and recommended actions
- Immediate: As of this writing, no official patched NivoCart release has been published for this issue. Organizations running NivoCart 2.4.0 or earlier should monitor the vendor’s repository for an update and apply it as soon as it is available.
- Workarounds/network mitigations (until patched):
- Restrict or disable the admin "forgot password" endpoint from public/internet access (e.g., via IP allow-listing, VPN, or WAF rules) until a fix is released.
- Implement rate-limiting/lockout on password reset request and redemption endpoints at the web server or WAF layer.
- Rotate administrator credentials and monitor authentication logs for repeated or unusual password-reset attempts.
- If customizing the codebase is feasible, replace the token generation logic with a cryptographically secure random value (e.g.,
bin2hex(random_bytes(32))) and add a short expiration window (e.g., ~60 minutes) to reset tokens.

