Back

HIGH

python: RecursionError: maximum recursion depth exceeded while calling a Python object

Published Jun 25, 2023

Description

The legacy email.utils.parseaddr function in Python through 3.11.4 allows attackers to trigger "RecursionError: maximum recursion depth exceeded while calling a Python object" via a crafted argument. This argument is plausibly an untrusted value from an application's input data that was supposed to contain a name and an e-mail address. NOTE: email.utils.parseaddr is categorized as a Legacy API in the documentation of the Python email package. Applications should instead use the email.parser.BytesParser or email.parser.Parser class. NOTE: the vendor's perspective is that this is neither a vulnerability nor a bug. The email package is intended to have size limits and to throw an exception when limits are exceeded; they were exceeded by the example demonstration code.

Affected products

Remediation

Red Hat statement

Red Hat Product Security does not treat this as a security bug because the function is already designed to raise various exceptions like AttributeError, LookupError, OSError, TypeError, UnicodeEncodeError, and ValueError when handling unexpected input. While RecursionError is less common, it occurs due to exceeding the recursion limit, which is an expected behavior in Python for handling deep or malformed input. This error doesn't introduce security risks like unauthorized access, code execution, or other security risks. Therefore, it is a performance or input handling limitation, not a security vulnerability.

Metrics

Weaknesses (1)

References (8)

Change history (0)

No recorded changes yet.

Sources
CVE.org / MITRE
Status PUBLISHED
Assigner mitre
Published Jun 25, 2023
Updated Nov 27, 2024
Reserved Jun 25, 2023
CISA Vulnrichment
Updated Nov 27, 2024
NVD
Status Modified
Modified Jun 17, 2026
Red Hat
Severity n/a
Public date Jun 25, 2023