CVE-2026-55379: Pillow `BdfFontFile`: `Image.new()` called without `_decompression_bomb_check()` — bomb protection bypass via font loading
PIL/BdfFontFile.py bdf_char() (lines 84–88) reads the BBX width height field from a BDF font file and passes the dimensions directly to Image.new() without calling Image._decompression_bomb_check(). This completely bypasses Pillow’s documented decompression bomb protection.
Image.open() enforces MAX_IMAGE_PIXELS = 89,478,485 and raises DecompressionBombError for images exceeding 2 × MAX = 178,956,970 pixels. The BDF font loading path calls Image.new() directly, which only calls _check_size() (validates >= 0) — no pixel count limit.
Vulnerable code (PIL/BdfFontFile.py lines 84–88):
References
- github.com/advisories/GHSA-45hq-cxwh-f6vc
- github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2026-2255.yaml
- github.com/python-pillow/Pillow/blob/main/docs/releasenotes/12.3.0.rst
- github.com/python-pillow/Pillow/commit/0a263e6264aa5399988d9acd3bbfbca2ca3ec77d
- github.com/python-pillow/Pillow/security/advisories/GHSA-45hq-cxwh-f6vc
- nvd.nist.gov/vuln/detail/CVE-2026-55379
Code Behaviors & Features
Detect and mitigate CVE-2026-55379 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →