CVE-2025-47737
criticalpriority · track · 39EPSS 0.006 · 46 %ileEUUSEPSS · scored 2026-10-27
lib.rs in the trailer crate through 0.1.2 for Rust mishandles allocating with a size of zero.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–critical · 2.9–9.8
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (4)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- GHSA-6x45-r4pr-5362trailer mishandles allocating with a size of zero2025-05-09ghsa · osvUS
lib.rs in the trailer crate through 0.1.2 for Rust mishandles allocating with a size of zero.
- RUSTSEC-2025-0163Unsound issue in Trailer2025-05-04vendor · osvUS
Our static analyzer find a potential unsound issue in the construction of Trailer, where it doesn't provide enough check to ensure the soundness. trailer/src/lib.rs, Lines 18 to 25 in d474984: ``` pub fn new(capacity: usize) -> Trailer<T> { unsafe { let trailer = Trailer::allocate(capacity); let ptr = trailer.ptr as *mut T; ptr.write(T::default()); trailer } } ``` The constructor does not check the T is not a ZST in rust, and allocating with size 0 is considered as undefined behaviors in Rust. A poc code like below can work: ``` use trailer::Trailer; #[derive(Default)] struct Zst; fn main() { let mut a = Trailer::<Zst>::new(0); drop(a); } ``` The trailer crate is unmaintained and this security issue will not be fixed.
also known as (5)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (7)
External citations — patches, advisories, analysis.
- https://access.redhat.com/security/cve/cve-2025-47737cnnvd
- https://crates.io/crates/trailercnnvd
- https://github.com/Geal/trailer/issues/2cnnvd
- https://crates.io/crates/trailerenisa_euvd
- https://github.com/Geal/trailer/issues/2enisa_euvd
- https://crates.io/crates/trailerProductnvd
- https://github.com/Geal/trailer/issues/2ExploitIssue Trackingnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan