CVE-2012-5618
Description
Ushahidi before 2.6.1 has insufficient entropy for forgot-password tokens.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
2<2.6.1+ 1 more
- (no CPE)range: <2.6.1
- (no CPE)range: before 2.6.1
Patches
Vulnerability mechanics
Root cause
"Insufficient entropy in forgot-password token generation — the token was derived solely from the user's email and last_login timestamp with no secret salt, making it guessable by an attacker who knows those values."
Attack vector
An attacker who knows a target user's email address and can estimate or obtain their `last_login` timestamp can compute the old token value, because the old code used `hash_password($user->email . $user->last_login)` with no secret salt [ref_id=1][ref_id=2]. The attacker triggers a password reset request for that user, then guesses the token offline using the known inputs. If successful, the attacker can supply the guessed token to the reset endpoint and set a new password, gaining full account access. No authentication is required to initiate the reset flow.
Affected code
The vulnerability existed in `application/controllers/login.php` where the forgot-password token was generated by `$auth->hash_password($user->email.$user->last_login)` [ref_id=2]. The fix introduces a new `_forgot_password_token()` method in `application/models/user.php` that uses `hash_hmac('sha1', ...)` with a random salt and a site-specific secret key [patch_id=2243832]. A new initialization block in `application/hooks/2_settings.php` generates a 64-character `forgot_password_secret` if one is not already set [patch_id=2243832].
What the fix does
The patch replaces the deterministic `hash_password($email.$last_login)` token with an HMAC-SHA1 of `last_login` and `email`, keyed by a concatenation of a 32-character random salt and a site-wide `forgot_password_secret` [patch_id=2243832]. The secret key is auto-generated on first run from a 64-character pool, ensuring an attacker without the secret cannot compute valid tokens even if they know the email and last_login [patch_id=2243832]. The new `check_forgot_password_token()` method extracts the salt from the token and recomputes the HMAC for verification, while the old `hash_password`-based comparison is removed [patch_id=2243832].
Preconditions
- inputAttacker must know the target user's email address
- inputAttacker must know or be able to estimate the target user's last_login timestamp
- configThe application must be running Ushahidi before version 2.6.1 (unpatched)
Generated on May 24, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
2- www.openwall.com/lists/oss-security/2012/12/04/1mitrex_refsource_MISC
- github.com/ushahidi/Ushahidi_Web/commit/e8c7ecd42818c331db8945d20f8b1865bc6d157emitrex_refsource_MISC
News mentions
0No linked articles in our index yet.