# GHSA-g23h-7vf9-xc25: Mimalloc Can Allocate Memory with Bad Alignment

- Severity: Medium (CVSS:4.0, scored by GitHub) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2022-11-23T12:00:00.000Z
- Modified: 2026-09-10T03:50:20.648Z
- Also known as: RUSTSEC-2022-0094

## Description

This crate depended on a promise regarding alignments made by the author of the mimalloc allocator to avoid using aligned allocation functions where possible for performance reasons.
Since then, the mimalloc allocator's logic changed, making it break this promise.
This caused this crate to return memory with an incorrect alignment for some allocations, particularly those with large alignments.
The flaw was fixed by always using the aligned allocation functions.

(As written by GitHub Advisory Database.)

## Affected

- mimalloc (crates.io): before 0.1.39; from 0.0.0-0 before 0.1.39

## References

- <https://github.com/purpleprotocol/mimalloc_rust/issues/87> (report, web)
- <https://github.com/purpleprotocol/mimalloc_rust> (package)
- <https://rustsec.org/advisories/RUSTSEC-2022-0094.html> (advisory, web)
- <https://crates.io/crates/mimalloc> (package)

## Sources

- GitHub Advisory Database: [GHSA-g23h-7vf9-xc25](https://github.com/advisories/GHSA-g23h-7vf9-xc25), CC-BY-4.0, modified 2026-09-10
- RustSec Advisory Database: [RUSTSEC-2022-0094](https://rustsec.org/advisories/RUSTSEC-2022-0094.html), CC0-1.0, modified 2025-10-28

---

Page: https://cve.day/GHSA-g23h-7vf9-xc25 · Whole record: https://cve.day/GHSA-g23h-7vf9-xc25.json · Rebuilt by cve.day 2026-11-25T22:56:43.127Z
