python: RecursionError: maximum recursion depth exceeded while calling a Python object
Published Jun 25, 2023
7.5
HIGHCVSS 3.1
EPSS 1.58%
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
No data.
No data.
Red Hat Enterprise Linux 6
python
Not affected
Red Hat Enterprise Linux 7
python
Not affected
Red Hat Enterprise Linux 7
python3
Not affected
Red Hat Enterprise Linux 8
gimp:flatpak/python2
Not affected
Red Hat Enterprise Linux 8
inkscape:flatpak/python2
Not affected
Red Hat Enterprise Linux 8
python27:2.7/python2
Not affected
Red Hat Enterprise Linux 8
python3
Not affected
Red Hat Enterprise Linux 8
python3.11
Not affected
Red Hat Enterprise Linux 8
python36:3.6/python36
Not affected
Red Hat Enterprise Linux 8
python39:3.9/python39
Not affected
Red Hat Enterprise Linux 9
python3.11
Not affected
Red Hat Enterprise Linux 9
python3.9
Not affected
Red Hat Software Collections
rh-python38-python
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 6 | python | Not affected | n/a |
| Red Hat Enterprise Linux 7 | python | Not affected | n/a |
| Red Hat Enterprise Linux 7 | python3 | Not affected | n/a |
| Red Hat Enterprise Linux 8 | gimp:flatpak/python2 | Not affected | n/a |
| Red Hat Enterprise Linux 8 | inkscape:flatpak/python2 | Not affected | n/a |
| Red Hat Enterprise Linux 8 | python27:2.7/python2 | Not affected | n/a |
| Red Hat Enterprise Linux 8 | python3 | Not affected | n/a |
| Red Hat Enterprise Linux 8 | python3.11 | Not affected | n/a |
| Red Hat Enterprise Linux 8 | python36:3.6/python36 | Not affected | n/a |
| Red Hat Enterprise Linux 8 | python39:3.9/python39 | Not affected | n/a |
| Red Hat Enterprise Linux 9 | python3.11 | Not affected | n/a |
| Red Hat Enterprise Linux 9 | python3.9 | Not affected | n/a |
| Red Hat Software Collections | rh-python38-python | Not affected | n/a |
No package ranges for this CVE.
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
No CVSS v4.0 score for this CVE.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
No CVSS v3.0 score for this CVE.
No CVSS v2.0 score for this CVE.
This CVE is not in the KEV list.
CISA SSVC (Vulnrichment)
Stakeholder-Specific Vulnerability Categorization from CISA ADP.
Exploitation
PoCAutomatable
YesTechnical Impact
PartialDecision
n/aAssessed Nov 27, 2024 · SSVC 2.0.3
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 3, 2026.
Score over time
2023–2026- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (10 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 3, 2026 | 1.58% (0.01584) | 74.72th | v5 (v2026.06.15) |
| Jun 15, 2026 | 1.32% (0.01319) | 67.00th | v5 (v2026.06.15) |
| Mar 30, 2025 | 1.02% (0.01023) | 75.26th | v4 (v2025.03.14) |
| Mar 29, 2025 | 2.74% (0.02745) | 76.62th | v4 (v2025.03.14) |
| Mar 17, 2025 | 1.02% (0.01023) | 75.73th | v4 (v2025.03.14) |
| Dec 12, 2024 | 0.13% (0.00134) | 50.26th | v3 (v2023.03.01) |
| Jul 1, 2024 | 0.11% (0.00108) | 44.00th | v3 (v2023.03.01) |
| May 25, 2024 | 0.07% (0.00073) | 31.45th | v3 (v2023.03.01) |
| Jul 7, 2023 | 0.05% (0.00052) | 18.00th | v3 (v2023.03.01) |
| Jun 26, 2023 | 0.04% (0.00045) | 12.34th | v3 (v2023.03.01) |
References (8)
- https://access.redhat.com/security/cve/CVE-2023-36632 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2217338 Issue Tracking
- https://docs.python.org/3/library/email.html Product
- https://docs.python.org/3/library/email.utils.html Product
- https://github.com/Daybreak2019/PoC_python3.9_Vul/blob/main/RecursionError-email.utils.parseaddr.py Product
- https://github.com/python/cpython/issues/103800 ExploitIssue Tracking
- https://nvd.nist.gov/vuln/detail/CVE-2023-36632
- https://www.cve.org/CVERecord?id=CVE-2023-36632
Change history (0)
No recorded changes yet.