CVE Vulnerabilities

CVE-2021-25292

Inefficient Regular Expression Complexity

Published: Mar 19, 2021 | Modified: Nov 21, 2024
CVSS 3.x
6.5
MEDIUM
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
CVSS 2.x
4.3 MEDIUM
AV:N/AC:M/Au:N/C:N/I:N/A:P
RedHat/V2
RedHat/V3
7.5 MODERATE
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

An issue was discovered in Pillow before 8.1.1. The PDF parser allows a regular expression DoS (ReDoS) attack via a crafted PDF file because of a catastrophic backtracking regex.

Weakness

The product uses a regular expression with an inefficient, possibly exponential worst-case computational complexity that consumes excessive CPU cycles.

Affected Software

NameVendorStart VersionEnd Version
PillowPython*8.1.1 (excluding)
Red Hat Enterprise Linux 8RedHatpython-pillow-0:5.1.1-16.el8*
Red Hat Quay 3RedHatquay/quay-rhel8:v3.6.0-62*
PillowUbuntubionic*
PillowUbuntuesm-infra/bionic*
PillowUbuntuesm-infra/focal*
PillowUbuntufocal*
PillowUbuntugroovy*
PillowUbuntutrusty*
PillowUbuntuupstream*
Pillow-python2Ubuntufocal*
Pillow-python2Ubuntugroovy*
Python-imagingUbuntuprecise/esm*

Extended Description

	  Attackers can create crafted inputs that
	  intentionally cause the regular expression to use
	  excessive backtracking in a way that causes the CPU
	  consumption to spike.

Potential Mitigations

References