---
title: "CVE-2023-44271"
date: "2023-07-01T07:00:00+00:00"
url: "https://checkmarx.com/zero/vulnerabilities/cve-2023-44271/"
---

# CVE-2023-44271

[Disclosed vulnerabilities](https://checkmarx.com/zero/vulnerabilities/)

Fixed: Jul 1, 2023

CVE-2023-44271  **Published:** Jul 1, 2023

7.5 High Severity denial of service dos pypi python

JO João Oliveira  Reported by Checkmarx Zero

Details Overview

## Summary

Python’s package `Pillow` prior to 10.0.0 allows attackers to cause a Denial of Service when using arbitrary strings as text input in “ImageFont” methods that calculate text size or render text to an image. The number of characters passed to these methods is not properly checked, potentially causing a service to crash by having it run out of memory.

## Product

This vulnerability affects Python’s package `Pillow` in versions prior to 10.0.0.

## Impact

This issue may lead to a service crash (DoS) if too many characters are passed to “ImageFont” methods that calculate text size or render text to an image.

## Steps to reproduce

1. Install the Pillow package dependency for any version prior to 10.0.0.
2. Create the file `poc.py`:

    ```python

    from PIL import ImageFont, Image, ImageDraw
    ```

font = ImageFont.truetype(“ARIAL.TTF”, 20)

test = “x33” \* 900000000

im = Image.new(“RGB”, (200, 200), “white”)  
d = ImageDraw.Draw(im)  
d.textlength(test, font)

```

3. Run `python poc.py`

### Expected result:
The OS will allocate memory indefinitely until a crash occurs.
```

## Remediation

A fix was released in commit [e37b250](https://github.com/python-pillow/Pillow/commit/e37b25087d39bd54495380a9898c8c7a2a4698d1) for version 10.0.0, where a new constant was introduced: MAX\_STRING\_LENGTH. The constant limits the maximum number of characters allowed to be passed to the “ImageFont” methods that calculate text size or render text to an image. The constant’s value is set to 1,000,000 by default.

## Credit

This issue was discovered and reported by Checkmarx SCA Security Analyst [João Oliveira](https://www.linkedin.com/in/jo%C3%A3o-oliveira-638b5315b/).

## Resources

1. [Pull Request](https://github.com/python-pillow/Pillow/pull/7244)
2. [Commit](https://github.com/python-pillow/Pillow/commit/e37b25087d39bd54495380a9898c8c7a2a4698d1)

0  High Severity CVSS v3.1 Score

   7.5

CVSS v3.1 Vectors- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: None
- Availability Impact: High

Advisory Timeline1. Discovered Jun 1, 2023
2. Disclosed Jun 14, 2023 The vulnerability was privately disclosed to the maintainer
3. Fixed Jul 1, 2023 Version 10.0.0 got released with the vulnerability fix.

## Explore more findings

[22 Apr 2026 CVE-2026-42236  Unauthenticated Denial of Service in n8n via MCP Client Registration   8.7  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2026-4223/) [22 Apr 2026 CVE-2026-42230  n8n has Open Redirect in MCP OAuth Consent Flow   5.1  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2026-42230/) [27 Feb 2026 CVE-2026-27578  n8n Vulnerable to Stored XSS via Various Nodes   8.5  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2026-27578/) [26 Feb 2026 CVE-2026-27950  Use-after-free in FreeRDP SDL2   5.5  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2026-27950/) [27 Nov 2025 CVE-2025-34281  Stored Cross-Site Scripting (XSS) in ThingsBoard   6.2  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2025-34281/) [17 Jan 2025 CVE-2025-0825  HTTP Response Splitting in cpp-httplib   6.9  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2025-0825/) [17 Jun 2025 CVE-2025-6050  Stored Cross-Site Scripting (XSS) in Mezzanine CMS Admin Interface   4.8  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2025-6050/) [12 Dec 2024 CVE-2024-8374  Code Injection in UltiMaker Cura   7.8  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2024-8374/) [14 Nov 2024 CVE-2024-52526  Stored Cross-site Scripting in @LibreNMS/LibreNMS Services Tab   7.5  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2024-52526/) [14 Nov 2024 CVE-2024-51497  Stored Cross-site Scripting in @LibreNMS/LibreNMS Custom OID Tab   7.5  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2024-51497/) [14 Nov 2024 CVE-2024-51496  Reflected Cross-site Scripting in @LibreNMS/LibreNMS /wireless and /health endpoints   7.5  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2024-51496/) [  14 Nov 2024 CVE-2024-51495  Stored Cross-site Scripting in @LibreNMS/LibreNMS Device Overview `overwrite\_ip` Field   7.5  Visit the page ](https://checkmarx.com/zero/vulnerabilities/cve-2024-51495/)
