cve.bz

CVE-2021-27378 rand core project rand core: Incorrect Calculation of Buffer Size

9.8 criticalEPSS 1.3%Fix available

Critical (9.8) in rand core project rand core. EPSS 1.3% estimated probability of exploitation activity in the next 30 days. Fixed in rand_core 0.6.2.

On this page
An issue was discovered in the rand_core crate before 0.6.2 for Rust. Because read_u32_into and read_u64_into mishandle certain buffer-length checks, a random number generator may be seeded with too little data.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
1.3% (unchanged from 1.3% a week ago; 1.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 69th percentile. Scored 2026-11-30. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-131 Incorrect Calculation of Buffer Size
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-27378 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-27378?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-27378?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-27378 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
rand_core_project:rand_corefrom 0.6.0 before 0.6.2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-w7j2-35mf-95p7crates.iorand_core>=0.6.0 <0.6.20.6.2
RUSTSEC-2021-0023crates.iorand_core>=0.6.0 <0.6.20.6.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Ubuntu20.04:LTS, 22.04:LTS, 24.04:LTS and 3 morerust-rand-coreno fix listedUBUNTU-CVE-2021-27378
Azure Linux3librsvg22.58.1-1AZL-41851

From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu.

Attack patterns (CAPEC)

  • CAPEC-47 Buffer Overflow via Parameter Expansion Likelihood: Medium · Severity: High
  • CAPEC-100 Overflow Buffers Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON