{"id":"CVE-2020-35861","aliases":["CVE-2020-35861","GHSA-vqx7-pw4r-29rr","RUSTSEC-2020-0006"],"related":[],"kind":"vulnerability","state":"published","title":"Out of bounds read in bumpalo","summary":"An issue was discovered in the bumpalo crate before 3.2.1 for Rust. The realloc feature allows the reading of unknown memory. Attackers can potentially read cryptographic keys.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the bumpalo crate before 3.2.1 for Rust. The realloc feature allows the reading of unknown memory. Attackers can potentially read cryptographic keys.","source":"cvelist"},{"lang":"en","text":"When `realloc`ing, if we allocate new space, we need to copy the old\nallocation's bytes into the new space. There are `old_size` number of bytes in\nthe old allocation, but we were accidentally copying `new_size` number of bytes,\nwhich could lead to copying bytes into the realloc'd space from past the chunk\nthat we're bump allocating out of, from unknown memory.\n\nIf an attacker can cause `realloc`s, and can read the `realoc`ed data back,\nthis could allow them to read things from other regions of memory that they\nshouldn't be able to. For example, if some crypto keys happened to live in\nmemory right after a chunk we were bump allocating out of, this could allow\nthe attacker to read the crypto keys.\n\nBeyond just fixing the bug and adding a regression test, I've also taken two\nadditional steps:\n\n1. While we were already running the testsuite under `valgrind` in CI, because\n   `valgrind` exits with the same code that the program did, if there are\n   invalid reads/writes that happen not to trigger a segfault, the program can\n   still exit OK and we will be none the wiser. I've enabled the\n   `--error-exitcode=1` flag for `valgrind` in CI so that tests eagerly fail\n   in these scenarios.\n\n2. I've written a quickcheck test to exercise `realloc`. Without the bug fix\n   in this patch, this quickcheck immediately triggers invalid reads when run\n   under `valgrind`. We didn't previously have quickchecks that exercised\n   `realloc` because `realloc` isn't publicly exposed directly, and instead\n   can only be indirectly called. This new quickcheck test exercises `realloc`\n   via `bumpalo::collections::Vec::resize` and\n   `bumpalo::collections::Vec::shrink_to_fit` calls.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se detectó un problema en la crate bumpalo versiones anteriores a 3.2.1 para Rust.&#xa0;La funcionalidad realloc permite una lectura de memoria desconocida.&#xa0;Los atacantes pueden potencialmente leer claves criptográficas.","source":"nvd"}],"published":"2020-03-24T12:00:00.000Z","modified":"2026-06-17T03:14:29.013Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-125"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"3.2.1"}],"ecosystem":"crates.io","package":"bumpalo","purl":"pkg:cargo/bumpalo","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"3.2.1"}],"ecosystem":"crates.io","package":"bumpalo","purl":"pkg:cargo/bumpalo","source":"rustsec"},{"ranges":[{"status":"affected","introduced":"3.0.0","fixed":"3.2.1"}],"vendor":"bumpalo_project","product":"bumpalo","cpe":"cpe:2.3:a:bumpalo_project:bumpalo:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2020-0006.html","tags":["advisory","exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-35861","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/fitzgen/bumpalo/issues/69","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/fitzgen/bumpalo","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/bumpalo","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-35861","url":"https://www.cve.org/CVERecord?id=CVE-2020-35861","licence":"CVE Terms of Use","modified":"2024-08-04T17:16:12.545Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vqx7-pw4r-29rr","url":"https://github.com/advisories/GHSA-vqx7-pw4r-29rr","licence":"CC-BY-4.0","modified":"2023-11-08T04:03:36.095Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2020-0006","url":"https://rustsec.org/advisories/RUSTSEC-2020-0006.html","licence":"CC0-1.0","modified":"2023-11-08T04:03:36.095Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-35861","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-35861","licence":"Public domain","modified":"2026-06-17T03:14:29.013Z"}],"updatedAt":"2026-11-25T22:57:56.666Z","epss":{"score":0.01509,"percentile":0.75169,"date":"2026-12-01T12:00:22.000Z"}}