Maligned causes incorrect deallocationGHSA-wm8x-php5-hvq6
GHSA-wm8x-php5-hvq6 is a security vulnerability in maligned. The records list no fixed version yet; check the vendor advisory below and apply the mitigations in the meantime.
Real-World Exposure
malignedReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.
Description
maligned::align_first manually allocates with an alignment larger than T, and then uses Vec::from_raw_parts on that allocation to get a Vec<T>.
GlobalAlloc::dealloc requires that the layout argument must be the same layout that was used to allocate that block of memory.
When deallocating, Box and Vec may not respect the specified alignment and can cause undefined behavior.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🦀crates.io | maligned | all versions | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for maligned, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Remediation status
The records we use list no patched version of maligned for GHSA-wm8x-php5-hvq6. Check the maintainer's advisory, and where your build allows, override or pin the dependency away from the vulnerable range.
Mitigate without a patch
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Frequently Asked Questions
Is GHSA-wm8x-php5-hvq6 in your dependencies?
Find it across crates.io, including transitive dependencies.