{"id":"CVE-2021-25902","aliases":["CVE-2021-25902","GHSA-cx4j-fxr7-jxg8","RUSTSEC-2021-0005"],"related":[],"kind":"vulnerability","state":"published","title":"Double free in glsl-layout","summary":"An issue was discovered in the glsl-layout crate before 0.4.0 for Rust. When a panic occurs, map_array can perform a double drop.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the glsl-layout crate before 0.4.0 for Rust. When a panic occurs, map_array can perform a double drop.","source":"cvelist"},{"lang":"en","text":"Affected versions of this crate did not guard against panic within the user-provided function f (2nd parameter of fn map_array), and thus panic within f causes double drop of a single object.\n\nThe flaw was corrected in the 0.4.0 release by wrapping the object vulnerable to a double drop within ManuallyDrop<T>.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Affected versions of this crate did not guard against panic within the user-provided function `f` (2nd parameter of `fn map_array`), and thus panic within `f` \ncauses double drop of a single object.\n\nThe flaw was corrected in the 0.4.0 release by wrapping the object vulnerable\nto a double drop within `ManuallyDrop<T>`.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se detectó un problema en la crate glsl-layout versiones anteriores a 0.4.0 para Rust.&#xa0;Cuando ocurre un pánico, map_array puede llevar a cabo una doble caída","source":"nvd"}],"published":"2021-01-10T12:00:00.000Z","modified":"2026-06-17T03:42:32.960Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","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:N/I:N/A:H","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:N/I:N/A:H","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:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"}],"cwes":["CWE-415"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.4.0"}],"ecosystem":"crates.io","package":"glsl-layout","purl":"pkg:cargo/glsl-layout","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.4.0"}],"ecosystem":"crates.io","package":"glsl-layout","purl":"pkg:cargo/glsl-layout","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.4.0"}],"vendor":"glsl-layout_project","product":"glsl-layout","cpe":"cpe:2.3:a:glsl-layout_project:glsl-layout:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0005.html","tags":["advisory","exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25902","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rustgd/glsl-layout/pull/10","tags":["web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/rustgd/glsl-layout","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/glsl-layout","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-25902","url":"https://www.cve.org/CVERecord?id=CVE-2021-25902","licence":"CVE Terms of Use","modified":"2024-08-03T20:11:28.582Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cx4j-fxr7-jxg8","url":"https://github.com/advisories/GHSA-cx4j-fxr7-jxg8","licence":"CC-BY-4.0","modified":"2023-11-08T04:05:16.613Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2021-0005","url":"https://rustsec.org/advisories/RUSTSEC-2021-0005.html","licence":"CC0-1.0","modified":"2023-11-08T04:05:16.613Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-25902","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25902","licence":"Public domain","modified":"2026-06-17T03:42:32.960Z"}],"updatedAt":"2026-11-25T22:57:59.724Z","epss":{"score":0.01407,"percentile":0.73438,"date":"2026-12-02T12:00:21.000Z"}}