# CVE-2021-4240: phpservermon User.php generatePasswordResetToken predictable algorithm in random number generator

- Severity: Low 2.6 (CVSS:3.1, scored by VulDB) `CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N`
- 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.07%, higher than 65% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-11-15T00:00:00.000Z
- Modified: 2026-06-17T04:19:19.977Z
- Also known as: GHSA-97w9-gcc7-vr8g
- Weaknesses: CWE-330, CWE-331, CWE-1241
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: VulDB

## Description

A vulnerability, which was classified as problematic, was found in phpservermon. This affects the function generatePasswordResetToken of the file src/psm/Service/User.php. The manipulation leads to use of predictable algorithm in random number generator. The exploit has been disclosed to the public and may be used. The name of the patch is 3daa804d5f56c55b3ae13bfac368bb84ec632193. It is recommended to apply a patch to fix this issue. The identifier VDB-213717 was assigned to this vulnerability.

(As written by CVE List.)

## Affected

- unspecified phpservermon: n/a
- phpservermon/phpservermon (Packagist): before 3.6.0
- phpservermonitor php_server_monitor: no versions given

## Every score

- VulDB: CVSS:3.1 2.6 Low `CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`

## References

- <https://huntr.dev/bounties/2-phpservermon/phpservermon/> (exploit, patch, third-party-advisory)
- <https://github.com/phpservermon/phpservermon/commit/3daa804d5f56c55b3ae13bfac368bb84ec632193> (patch, third-party-advisory, web)
- <https://vuldb.com/?id.213717> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-4240> (advisory)
- <https://github.com/phpservermon/phpservermon> (package)
- <https://huntr.dev/bounties/2-phpservermon/phpservermon> (web)

## Sources

- CVE List: [CVE-2021-4240](https://www.cve.org/CVERecord?id=CVE-2021-4240), CVE Terms of Use, modified 2025-04-15
- GitHub Advisory Database: [GHSA-97w9-gcc7-vr8g](https://github.com/advisories/GHSA-97w9-gcc7-vr8g), CC-BY-4.0, modified 2024-02-20
- NVD: [CVE-2021-4240](https://nvd.nist.gov/vuln/detail/CVE-2021-4240), Public domain, modified 2026-06-17

---

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