CVE Vulnerabilities

CVE-2021-25292

Inefficient Regular Expression Complexity

Published: Mar 19, 2021 | Modified: Aug 08, 2023
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

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

Name Vendor Start Version End Version
Pillow Python * 8.1.1 (excluding)
Red Hat Enterprise Linux 8 RedHat python-pillow-0:5.1.1-16.el8 *
Red Hat Quay 3 RedHat quay/quay-rhel8:v3.6.0-62 *
Pillow Ubuntu bionic *
Pillow Ubuntu focal *
Pillow Ubuntu groovy *
Pillow Ubuntu trusty *
Pillow Ubuntu upstream *
Pillow-python2 Ubuntu groovy *
Python-imaging Ubuntu precise/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