# CVE-2025-2814: Crypt::CBC versions between 1.21 and 3.05 for Perl may use insecure rand() function for cryptographic functions

- Severity: Medium 4.0 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- 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): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2025-04-12T23:41:48.511Z
- Modified: 2026-06-17T09:07:39.950Z
- Weaknesses: CWE-329, CWE-331, CWE-338
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: CPANSec

## Description

Crypt::CBC versions between 1.21 and 3.05 for Perl may use the rand() function as the default source of entropy, which is not cryptographically secure, for cryptographic functions.

This issue affects operating systems where "/dev/urandom'" is unavailable.  In that case, Crypt::CBC will fallback to use the insecure rand() function.

(As written by CVE List.)

## Affected

- Crypt-CBC: from 1.21 up to 3.05

## References

- <https://perldoc.perl.org/functions/rand>
- <https://metacpan.org/dist/Crypt-CBC/source/lib/Crypt/CBC.pm#L777>
- <https://security.metacpan.org/docs/guides/random-data-for-security.html>
- <https://github.com/lstein/Lib-Crypt-CBC/commit/37111f7cd894bcec46156ba7f40a49c126ebf535.patch> (patch)

## Sources

- CVE List: [CVE-2025-2814](https://www.cve.org/CVERecord?id=CVE-2025-2814), CVE Terms of Use, modified 2025-09-05
- NVD: [CVE-2025-2814](https://nvd.nist.gov/vuln/detail/CVE-2025-2814), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-2814 · Whole record: https://cve.day/CVE-2025-2814.json · Rebuilt by cve.day 2026-11-25T22:58:56.422Z
