CVE Vulnerabilities

CVE-2024-7592

Inefficient Regular Expression Complexity

Published: Aug 19, 2024 | Modified: Sep 04, 2024
CVSS 3.x
7.5
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
4.8 LOW
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:H
Ubuntu
LOW

There is a LOW severity vulnerability affecting CPython, specifically the http.cookies standard library module.

When parsing cookies that contained backslashes for quoted characters in the cookie value, the parser would use an algorithm with quadratic complexity, resulting in excess CPU resources being used while parsing the value.

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
Python Python * 3.12.5 (including)
Python Python 3.13.0-alpha0 (including) 3.13.0-alpha0 (including)
Python Python 3.13.0-alpha1 (including) 3.13.0-alpha1 (including)
Python Python 3.13.0-alpha2 (including) 3.13.0-alpha2 (including)
Python Python 3.13.0-alpha3 (including) 3.13.0-alpha3 (including)
Python Python 3.13.0-alpha4 (including) 3.13.0-alpha4 (including)
Python Python 3.13.0-alpha5 (including) 3.13.0-alpha5 (including)
Python Python 3.13.0-alpha6 (including) 3.13.0-alpha6 (including)
Python Python 3.13.0-beta1 (including) 3.13.0-beta1 (including)
Python Python 3.13.0-beta2 (including) 3.13.0-beta2 (including)
Python Python 3.13.0-beta3 (including) 3.13.0-beta3 (including)
Python Python 3.13.0-beta4 (including) 3.13.0-beta4 (including)
Python Python 3.13.0-rc1 (including) 3.13.0-rc1 (including)
Python2.7 Ubuntu esm-apps/focal *
Python2.7 Ubuntu esm-apps/jammy *
Python2.7 Ubuntu esm-infra/bionic *
Python2.7 Ubuntu esm-infra/xenial *
Python2.7 Ubuntu focal *
Python2.7 Ubuntu jammy *
Python2.7 Ubuntu trusty/esm *
Python3.10 Ubuntu jammy *
Python3.12 Ubuntu noble *
Python3.12 Ubuntu upstream *
Python3.13 Ubuntu upstream *
Python3.5 Ubuntu esm-infra/xenial *
Python3.5 Ubuntu trusty/esm *
Python3.8 Ubuntu focal *

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