---
id: 1758
title: "libmagic: The Blathering"
source_domain: blog.trailofbits.com
source_url: "https://blog.trailofbits.com/2022/07/01/libmagic-the-blathering/"
published_at: "2022-07-01T11:00:27Z"
tags: ["reverse-engineering", "cve", "libmagic", "polyfile", "file-formats", "cleanroom-implementation"]
phying_url: "https://phying.com/item/1758"
lang: en
---

# libmagic: The Blathering

## Summary

Trail of Bits documents the quirks uncovered while building a pure-Python cleanroom implementation of libmagic for PolyFile, from its arcane magic-file DSL to memory safety bugs behind numerous CVEs.

## Intelligence Metadata

- **Sources:** blog.trailofbits.com
- **Published:** 2022-07-01T11:00:27Z
- **Original:** https://blog.trailofbits.com/2022/07/01/libmagic-the-blathering/
- **Phying News:** https://phying.com/item/1758
