{"id":"CVE-2025-47737","aliases":["CVE-2025-47737","GHSA-6x45-r4pr-5362","RUSTSEC-2025-0163"],"related":[],"kind":"vulnerability","state":"published","title":"trailer mishandles allocating with a size of zero","summary":"lib.rs in the trailer crate through 0.1.2 for Rust mishandles allocating with a size of zero.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"lib.rs in the trailer crate through 0.1.2 for Rust mishandles allocating with a size of zero.","source":"cvelist"},{"lang":"en","text":"Our static analyzer find a potential unsound issue\nin the construction of Trailer, where it doesn't\nprovide enough check to ensure the soundness.\n\ntrailer/src/lib.rs, Lines 18 to 25 in d474984:\n```\n pub fn new(capacity: usize) -> Trailer<T> { \n     unsafe { \n         let trailer = Trailer::allocate(capacity); \n         let ptr = trailer.ptr as *mut T; \n         ptr.write(T::default()); \n         trailer \n     } \n } \n```\n\nThe constructor does not check the T is not a ZST in\nrust, and allocating with size 0 is considered\nas undefined behaviors in Rust. A poc code like\nbelow can work:\n\n```\nuse trailer::Trailer;\n#[derive(Default)]\nstruct Zst;\n\nfn main() {\n    let mut a = Trailer::<Zst>::new(0);\n    drop(a);\n}\n```\n\nThe trailer crate is unmaintained and this security issue\nwill not be fixed.","format":"markdown","source":"rustsec"},{"lang":"es","text":"lib.rs en el contenedor del remolque hasta la versión 0.1.2 para Rust maneja incorrectamente la asignación con un tamaño de cero.","source":"nvd"}],"published":"2025-05-04T12:00:00.000Z","modified":"2026-06-17T09:28:37.830Z","severity":{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","score":2.9,"rating":"LOW"},"severities":[{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","score":2.9,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","score":2.9,"rating":"LOW"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","score":2.9,"rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-762"],"affected":[{"ranges":[{"type":"semver","introduced":"0","lastAffected":"0.1.2","status":"affected"}],"vendor":"Geal","product":"trailer","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"0.1.2"}],"ecosystem":"crates.io","package":"trailer","purl":"pkg:cargo/trailer","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected"}],"ecosystem":"crates.io","package":"trailer","purl":"pkg:cargo/trailer","source":"rustsec"},{"ranges":[{"status":"affected","lastAffected":"0.1.2"}],"vendor":"unhandledexpression","product":"trailer","cpe":"cpe:2.3:a:unhandledexpression:trailer:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://github.com/Geal/trailer/issues/2","tags":["exploit","issue-tracking","report","web"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://crates.io/crates/trailer","tags":["package","product","web"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-47737","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/Geal/trailer","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2025-0163.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-05-09T15:53:35.539Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-47737","url":"https://www.cve.org/CVERecord?id=CVE-2025-47737","licence":"CVE Terms of Use","modified":"2025-05-09T15:54:31.213Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6x45-r4pr-5362","url":"https://github.com/advisories/GHSA-6x45-r4pr-5362","licence":"CC-BY-4.0","modified":"2026-06-09T12:00:11.697Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2025-0163","url":"https://rustsec.org/advisories/RUSTSEC-2025-0163.html","licence":"CC0-1.0","modified":"2026-06-10T06:13:29.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-47737","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-47737","licence":"Public domain","modified":"2026-06-17T09:28:37.830Z"}],"updatedAt":"2026-11-25T22:58:57.836Z","epss":{"score":0.00562,"percentile":0.4809,"date":"2026-12-01T12:00:22.000Z"}}