{"id":"GHSA-f95p-4cv5-8w8x","aliases":["RUSTSEC-2024-0407"],"status":"published","title":"linkme fails to ensure slice elements match the slice's declared type","description":"Affected versions allow populating a DistributedSlice of T with elements of an arbitrary other type that coerces to T. For example, elements of type `\u0026\u0026str` could end up in a slice of type `[\u0026str]`, since `\u0026\u0026str` coerces to `\u0026str` via a deref coercion.\n\nThe flaw was corrected by implementing typechecking for distributed slice elements in such a way that coercion no longer occurs. The element's type must be a subtype of the slice's declared element type.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2024-03-05T12:00:00Z","modified":"2025-10-28T06:29:24Z","fixes":[{"ecosystem":"crates.io","package":"linkme","fixed_in":["0.3.24"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"linkme","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.3.24"}]}]},{"source":"osv","ecosystem":"crates.io","package":"linkme","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.3.24"}]}]},{"source":"osv","ecosystem":"crates.io","package":"linkme","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.3.24"}]}]}],"references":[{"url":"https://github.com/dtolnay/linkme/issues/82","tags":["web","report"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0407.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-f95p-4cv5-8w8x"},{"url":"https://github.com/dtolnay/linkme","tags":["package"]},{"url":"https://crates.io/crates/linkme","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-f95p-4cv5-8w8x","title":"linkme fails to ensure slice elements match the slice's declared type","description":"Affected versions allow populating a DistributedSlice of T with elements of an arbitrary other type that coerces to T. For example, elements of type `\u0026\u0026str` could end up in a slice of type `[\u0026str]`, since `\u0026\u0026str` coerces to `\u0026str` via a deref coercion.\n\nThe flaw was corrected by implementing typechecking for distributed slice elements in such a way that coercion no longer occurs. The element's type must be a subtype of the slice's declared element type.","status":"published","published":"2024-12-04T18:26:13Z","modified":"2024-12-04T18:26:13Z","updated_at":"2026-11-02T14:38:24.542211Z"}],"osv":[{"id":"GHSA-f95p-4cv5-8w8x","title":"linkme fails to ensure slice elements match the slice's declared type","description":"Affected versions allow populating a DistributedSlice of T with elements of an arbitrary other type that coerces to T. For example, elements of type `\u0026\u0026str` could end up in a slice of type `[\u0026str]`, since `\u0026\u0026str` coerces to `\u0026str` via a deref coercion.\n\nThe flaw was corrected by implementing typechecking for distributed slice elements in such a way that coercion no longer occurs. The element's type must be a subtype of the slice's declared element type.","status":"published","published":"2024-12-04T18:26:13Z","modified":"2025-10-28T06:29:24.336519Z","updated_at":"2026-11-02T15:46:46.006631Z"},{"id":"RUSTSEC-2024-0407","title":"Fails to ensure slice elements match the slice's declared type","description":"Affected versions allow populating a DistributedSlice of T with elements of an\narbitrary other type that coerces to T. For example, elements of type `\u0026\u0026str`\ncould end up in a slice of type `[\u0026str]`, since `\u0026\u0026str` coerces to `\u0026str` via a\nderef coercion.\n\nThe flaw was corrected by implementing typechecking for distributed slice\nelements in such a way that coercion no longer occurs. The element's type must\nbe a subtype of the slice's declared element type.","status":"published","published":"2024-03-05T12:00:00Z","modified":"2025-10-28T06:29:24.336519Z","updated_at":"2026-11-02T15:53:39.971022Z"}]}}
