{"id":"CVE-2021-25902","aliases":["EUVD-2021-1687","GHSA-cx4j-fxr7-jxg8","RUSTSEC-2021-0005"],"status":"published","title":"Double free in glsl-layout","description":"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.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-10","score":0.01407,"percentile":0.72836,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-415"],"published":"2021-01-10T12:00:00Z","modified":"2026-06-17T03:42:32Z","fixes":[{"ecosystem":"crates.io","package":"glsl-layout","fixed_in":["0.4.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"glsl-layout","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.4.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"glsl-layout","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.4.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"glsl-layout","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.4.0"}]}]}],"products":[{"vendor":"glsl-layout_project","product":"glsl-layout"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0005.html","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","web","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25902","tags":["advisory"]},{"url":"https://github.com/rustgd/glsl-layout/pull/10","tags":["web"]},{"url":"https://github.com/advisories/GHSA-cx4j-fxr7-jxg8"},{"url":"https://github.com/rustgd/glsl-layout","tags":["package"]},{"url":"https://crates.io/crates/glsl-layout","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-25902","description":"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.","status":"published","published":"2021-01-22T09:03:11Z","modified":"2024-08-03T20:11:28.582Z","updated_at":"2026-11-02T14:32:59.802172Z"}],"euvd":[{"id":"EUVD-2021-1687","description":"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.","status":"published","published":"2021-01-22T09:03:11Z","modified":"2024-08-03T20:11:28Z","updated_at":"2026-11-03T03:24:52.420769Z"}],"ghsa":[{"id":"GHSA-cx4j-fxr7-jxg8","title":"Double free in glsl-layout","description":"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\u003cT\u003e.","status":"published","published":"2021-08-25T20:53:01Z","modified":"2023-11-10T05:01:48Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-415"],"updated_at":"2026-11-02T14:37:18.40412Z"}],"nvd":[{"id":"CVE-2021-25902","description":"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.","status":"published","published":"2021-01-26T18:16:22.38Z","modified":"2026-06-17T03:42:32.96Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"updated_at":"2026-11-02T14:06:49.660551Z"}],"osv":[{"id":"GHSA-cx4j-fxr7-jxg8","title":"Double free in glsl-layout","description":"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\u003cT\u003e.","status":"published","published":"2021-08-25T20:53:01Z","modified":"2023-11-08T04:05:16.613204Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-415"],"updated_at":"2026-11-02T15:46:45.639885Z"},{"id":"RUSTSEC-2021-0005","title":"Double drop upon panic in 'fn map_array()'","description":"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\u003cT\u003e`.","status":"published","published":"2021-01-10T12:00:00Z","modified":"2023-11-08T04:05:16.613204Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:53:39.492624Z"}]}}
