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
Ubuntu

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 * *

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