TOTP secret guessing via weak random generation
Published Mar 4, 2021 · Updated Feb 25, 2026
Weak randomness in Joomla! CMS 3.2.0 through 3.9.24 allows attackers to narrow the candidate space for newly generated TOTP secrets. Joomla\CMS\Encrypt\Totp::generateSecret uses PHP rand() instead of a cryptographically secure generator when it creates the shared 2FA secret. Exploitation requires knowing the approximate secret-generation time; Joomla reports that millions of candidates remain and practical risk is low.
Summary
What happened
Weak randomness in Joomla! CMS 3.2.0 through 3.9.24 allows attackers to narrow the candidate space for newly generated TOTP secrets. Joomla\CMS\Encrypt\Totp::generateSecret uses PHP rand() instead of a cryptographically secure generator when it creates the shared 2FA secret. Exploitation requires knowing the approximate secret-generation time; Joomla reports that millions of candidates remain and practical risk is low.
The record
- CVE
- CVE-2021-23126
- Published
- Mar 4, 2021
- Updated
- Feb 25, 2026
- Vendor
- Joomla! Project
- Product
- Joomla! CMS
- Classifications
- CWE-338, T1110
- Attack vector
- network
- Privileges
- Unavailable
Timeline
How it unfolded
- Mar 4, 2021CVE publishedPublication date reported by the CVE source.
- Feb 25, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=3.2.0-3.9.24
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo