mupdf is vulnerable to Use After Free
43
CVE Score
Medium
Use After Free
The mupdf crate's PdfAnnotation stores a raw pointer to a MuPDF pdf_annot, and its annotation iterator yields these wrappers without keeping the parent PdfPage alive or taking a reference on the borrowed annotation. Because MuPDF exposes only a non-refcounted back-pointer from an annotation to its page, dropping the page while annotations remain in use, or iterating annotations and dropping the wrappers, frees memory that is still referenced. Processing or rendering a PDF that carries annotations then dereferences freed memory, causing crashes or memory corruption. The fix makes PdfAnnotation hold a ref-counted parent page handle, adds a borrowed-pointer constructor for the iterator, and applies correct refcounting.
Upgrade the mupdf library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and your application iterates or renders PDF annotations.
0.0.2 - 0.6.0
Fixed in 0.7.0mupdf is vulnerable to Use After Free in versions 0.0.2 - 0.6.0.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.