Skip to content
Heist/ feed
Back to feed
Critical

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-27378

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-27378
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 04:36 UTC · Revision 1

Source evidence

CVE-2021-27378

core-osv · Original source

Published 18 Feb 2021, 04:15 UTC

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.

osv:CVE-2021-27378
Complete source record
{
  "id": "520e05f4c576e8118ead338f57bfaa6da5d2cd08ee6db42717e6633a773a85a7",
  "url": "https://osv.dev/vulnerability/CVE-2021-27378",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-27378",
    "summary": "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.",
    "evidence": "osv:CVE-2021-27378",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2021-27378",
      "aliases": [
        "CVE-2021-27378",
        "GHSA-w7j2-35mf-95p7",
        "RUSTSEC-2021-0023"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/rust-random/rand",
              "type": "GIT",
              "events": [
                {
                  "introduced": "98e220c30234370fb04ba928799ebd9727fc049a"
                },
                {
                  "fixed": "3a03c9eb5350e03a3f540dba2ee34e0984f2c2c2"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:rand_core_project:rand_core:*:*:*:*:*:rust:*:*",
                    "range": [
                      {
                        "introduced": "0.6.0"
                      },
                      {
                        "fixed": "0.6.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "0.8.3",
            "0.8.2",
            "rand_core-0.6.1",
            "0.8.1",
            "rand_distr-0.4.0",
            "0.8.0",
            "rand_pcg-0.3.0",
            "rand_hc-0.3.0",
            "rand_core-0.6.0",
            "rand_chacha-0.3.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-27378.json"
          }
        }
      ],
      "modified": "2026-10-24T10:30:20.715907156Z",
      "provider": "osv",
      "references": [
        "https://rustsec.org/advisories/RUSTSEC-2021-0023.html"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-27378",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 430325,
  "published_at": "2021-02-18T04:15:11.823+00:00"
}