HIGH 7.5

CVE-2026-55379: Pillow BDF Font Decompression Bomb Memory Exhaustion (CVSS 7.5)

Pillow, a widely-used Python image processing library, contains a vulnerability that allows attackers to consume excessive memory on systems processing untrusted BDF (Bitmap Distribution Format) font files. When Pillow reads a maliciously crafted BDF font, it extracts dimension fields without validating whether they would trigger a decompression bomb—a file designed to expand to enormous size in memory. An attacker can supply a BDF font file with extremely large width and height values, causing Pillow to attempt allocating gigabytes of memory, leading to denial of service. The vulnerability bypasses Pillow's built-in protection mechanism that normally catches such attacks.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weaknesses (CWE)
CWE-789
Affected products
1 configuration(s)
Published / Modified
2026-07-06 / 2026-07-07

NVD description (verbatim)

Pillow is a Python imaging library. Prior to 12.3.0, PIL/BdfFontFile.py bdf_char() read the BBX width and height field from a BDF font file and passed attacker-controlled dimensions to Image.new() without calling Image._decompression_bomb_check(), bypassing Pillow's documented decompression bomb protection and allowing excessive memory allocation. This issue is fixed in version 12.3.0.

4 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability resides in PIL/BdfFontFile.py, specifically in the bdf_char() function. BDF font files contain character bitmap definitions with BBX (bounding box) fields specifying width and height. The vulnerable code extracts these attacker-controlled dimensions and passes them directly to Image.new() to create image objects without invoking Image._decompression_bomb_check(), which is Pillow's standard safeguard against memory exhaustion attacks. CWE-789 (Memory Allocation with Excessive Size Value) classifies this defect. An attacker crafting a BDF file with arbitrarily large BBX dimensions can force unbounded memory allocation, exhausting system resources and causing denial of service. The fix in version 12.3.0 ensures that decompression bomb checks are applied to BDF-derived image creation.

Business impact

Organizations running Pillow-dependent applications that process user-supplied or untrusted BDF font files face denial of service risk. A single malicious font file can render a service unavailable by consuming all available system memory, impacting availability guarantees. This is particularly relevant for document processing pipelines, web services handling font uploads, design applications, or any microservice that renders or analyzes font files. The attack requires no authentication and can be triggered remotely if the application exposes font file processing over a network interface.

Affected systems

Python Pillow versions prior to 12.3.0 are affected. Any application using Pillow to load or parse BDF font files is vulnerable if running an unpatched version. This includes web servers, document processors, image manipulation services, font rendering engines, and design software that accept BDF files as input. Systems where Pillow is a transitive dependency—pulled in by higher-level libraries—may also be affected without explicit awareness.

Exploitability

Exploitability is high. The attack requires no special privileges, no user interaction, and no special configuration beyond Pillow processing BDF files. An attacker can craft a malicious BDF file and deliver it via any channel the target application accepts font files: file uploads, API endpoints, email attachments parsed by document converters, or package repositories if the application auto-updates fonts. The CVSS vector (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) reflects network accessibility, low attack complexity, and high availability impact.

Remediation

Upgrade Pillow to version 12.3.0 or later. Organizations should verify the patch version against the official Python Pillow release notes and PyPI repository to confirm the exact version containing the fix. Additionally, consider implementing input validation to reject oversized or suspicious BDF files at the application layer, and apply resource limits (memory quotas, timeouts) to font processing operations as a defense-in-depth measure.

Patch guidance

Deploy Pillow 12.3.0 or newer as soon as feasible. Verify the version using `pip show pillow` or `python -c "import PIL; print(PIL.__version__)"`. If Pillow is a transitive dependency, identify the root package and update it to a version that requires Pillow 12.3.0+. Test patched deployments in a staging environment to confirm no regressions in font handling or image processing workflows before production rollout.

Detection guidance

Monitor for excessive memory usage spikes correlated with BDF font file processing or unusual font file uploads. If Pillow is instrumented with logging, look for errors related to BDF parsing or Image.new() calls with atypical dimensions. Behavioral indicators include sustained high memory consumption followed by process termination or restart. Threat hunters can examine application logs and process accounting for requests processing .bdf files that coincide with service degradation or crashes. Network-based detection is limited unless combined with endpoint telemetry.

Why prioritize this

This vulnerability merits urgent patching because it enables trivial, unauthenticated denial of service against any internet-facing service using Pillow for BDF processing. The attack surface is broad—any font file input is a potential vector. While not on the CISA KEV catalog at publication, the low barrier to exploitation and high availability impact make it a priority for organizations running vulnerable versions in production. Prioritize systems processing user-uploaded fonts or third-party font packages.

Risk score, explained

Pillow's CVSS 3.1 score of 7.5 (HIGH) reflects a network-exploitable, unauthenticated denial-of-service vulnerability with no special preconditions (low attack complexity) and high impact to availability. The score does not include confidentiality or integrity impacts because the attack only exhausts memory; it does not leak data or corrupt systems. The score appropriately captures the severity for most organizations, though context matters: a service processing only trusted, internal fonts faces lower risk than a public-facing API accepting arbitrary BDF uploads.

Frequently asked questions

Do I need to update if my application doesn't use BDF fonts?

Likely not, but verify. If your application uses Pillow exclusively for PNG, JPEG, or other non-BDF formats, this specific vulnerability does not apply. However, keeping Pillow up-to-date is a security best practice for other potential issues. Check your application's font handling code or dependencies to confirm no BDF processing occurs.

Can I mitigate this without upgrading Pillow immediately?

Partial mitigation is possible. Disable or sandbox BDF file processing if not essential to your service. Implement strict file size limits, reject files with suspicious headers, run font processing in isolated containers with memory limits, and use process resource controls (cgroups, ulimit) to prevent system-wide memory exhaustion. These measures reduce but do not eliminate risk; upgrading remains the definitive fix.

Does this affect Pillow 12.0, 12.1, or 12.2?

Yes. Any version prior to 12.3.0 is vulnerable. If your application reports Pillow version 12.0.x, 12.1.x, or 12.2.x, you are affected and should upgrade immediately to 12.3.0 or later.

Is there a known public exploit for this vulnerability?

As of publication, this vulnerability is not listed on the CISA Known Exploited Vulnerabilities catalog, indicating no widespread public exploit availability. However, the straightforward nature of the attack (craft a malicious BDF file) means exploitation could emerge quickly once details are disclosed. Do not rely on exploit scarcity as a mitigation strategy.

This analysis is based on publicly available CVE data as of the publication date. CVSS scores, vendor patch versions, and KEV catalog status reflect information current at that time and may change. Organizations should verify patch availability and compatibility against official vendor advisories and release notes before deployment. This intelligence is provided for informational purposes to aid security decision-making; it does not constitute legal advice or a guarantee of risk mitigation. Always conduct independent testing and validation in your environment prior to applying patches or security controls. Source: NVD (public-domain), retrieved 2026-08-15. Analysis generated by SEC.co (claude-haiku-4-5).