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

- Severity: High 8.1 (CVSS:3.0, scored by @huntrdev) `CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.85%, higher than 79% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-08-10T10:21:30.000Z
- Modified: 2026-06-17T04:05:34.093Z
- Also known as: GHSA-hq3v-rg6f-6hx4
- Weaknesses: CWE-330, CWE-1241
- Assigned by: @huntrdev

## Description

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

(As written by CVE List.)

## Affected

- yiisoft yiisoft/yii2: from unspecified up to 2.0.42.1
- yiisoft/yii2-dev (Packagist): before 2.0.43
- yiiframework yii: from 2.0.0 before 2.0.43

## Every score

- @huntrdev: CVSS:3.0 8.1 High `CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:N`

## References

- <https://huntr.dev/bounties/50aad1d4-eb00-4573-b8a4-dbe38e2c229f> (exploit, third-party-advisory, web)
- <https://github.com/yiisoft/yii2/commit/13f27e4d920a05d53236139e8b07007acd046a46> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-3689> (advisory)
- <https://github.com/yiisoft/yii2> (package)

## Sources

- CVE List: [CVE-2021-3689](https://www.cve.org/CVERecord?id=CVE-2021-3689), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-hq3v-rg6f-6hx4](https://github.com/advisories/GHSA-hq3v-rg6f-6hx4), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-3689](https://nvd.nist.gov/vuln/detail/CVE-2021-3689), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-3689 · Whole record: https://cve.day/CVE-2021-3689.json · Rebuilt by cve.day 2026-11-25T22:58:03.083Z
