
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2021-3692 affects the Yii2 PHP framework, specifically related to its random number generation implementation. The vulnerability was discovered and disclosed in August 2021, where the framework was found to be using a cryptographically weak random number generator. The issue specifically involved the use of mt_rand() function (Mersenne Twister) when generating tokens (CVE Details, MITRE).
The vulnerability stems from the use of the mt_rand() function, which is a Mersenne Twister-based random number generator that is not cryptographically secure. This implementation was used in various components of the framework, including token generation, CAPTCHA generation, and cache management. The vulnerability is classified under CWE-338 (Use of Cryptographically Weak Pseudo-Random Number Generator) (CWE Details).
The use of a predictable random number generator in security-critical functions could potentially allow attackers to predict generated values. This could affect various security mechanisms within the framework, including but not limited to token generation, CAPTCHA systems, and cache management. When such predictable values are used in security contexts, it could lead to bypass of security mechanisms (CWE Details).
The issue was fixed by replacing mt_rand() with random_int() and implementing the paragonie/random_compat library for secure random number generation. The fix was implemented in commit 13f27e4, which included updates to various components including CAPTCHA generation, cache management, and token generation systems (GitHub Commit).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."