VYPR
High severityNVD Advisory· Published Nov 3, 2023· Updated Aug 2, 2024

CVE-2023-44271

CVE-2023-44271

Description

An issue was discovered in Pillow before 10.0.0. It is a Denial of Service that uncontrollably allocates memory to process a given task, potentially causing a service to crash by having it run out of memory. This occurs for truetype in ImageFont when textlength in an ImageDraw instance operates on a long text argument.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Pillow before 10.0.0 has a denial-of-service vulnerability where processing long text strings with ImageFont can cause uncontrolled memory allocation and service crash.

Vulnerability

Description

CVE-2023-44271 is a denial-of-service (DoS) vulnerability in the Pillow Python imaging library, affecting versions before 10.0.0. The issue resides in the truetype font handling within ImageFont, specifically when the textlength method (or related methods like getbbox, getlength, getmask2) of an ImageDraw instance is called with an excessively long text string. The root cause is that the library does not validate the length of the text input before processing, leading to uncontrolled memory allocation that can exhaust available memory and crash the application [1][2][4].

Exploitation and

Attack Vector

An attacker can exploit this vulnerability by providing a very long text string to any Pillow application that uses ImageFont methods such as textlength, getbbox, getlength, or getmask2. No special privileges or authentication are required; the attack vector is over the network if the application accepts user-supplied text (e.g., in a web server, image processing service, or GUI). The vulnerability does not require any prior access, making it remotely exploitable with low complexity [2]. The issue was addressed in Pillow 10.0.0 by introducing a MAX_STRING_LENGTH constant (default 100,000 characters) and a _string_length_check function that raises a ValueError if the input exceeds this limit, preventing unbounded memory allocation [1][3].

Impact

Successful exploitation results in a denial-of-service condition: the Pillow process may consume all available memory and crash, disrupting the service availability for other users. Since the vulnerability is easily triggered by a single long string, it poses a significant risk to applications that process untrusted text input using Pillow's font metrics functions. There is no confidentiality or integrity impact, but the availability impact is high [2].

Mitigation

The vulnerability is fixed in Pillow version 10.0.0 and later. Users should upgrade immediately. No workarounds are available other than upgrading, as the fix introduces input length validation that prevents the memory exhaustion [1][2][3][4].

AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
pillowPyPI
< 10.0.010.0.0

Affected products

16

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

10

News mentions

0

No linked articles in our index yet.