← back
CVE-2023-27043

CVE-2023-27043

CVSS 5.3 MEDIUMEPSS 2.5%CWE-1286CWE-20
In short

Python's email module incorrectly parses certain email addresses with special characters, which can allow attackers to bypass domain-based email verification checks. An attacker could register or gain access using a forged email address that appears valid but isn't actually from the allowed domain.

Technical detail

The email parser in Python's email/_parseaddr.py mishandles RFC2822 headers containing special characters, causing incorrect extraction of the addr-spec portion. This enables authentication bypass attacks where domain-based email filters (e.g., requiring @company.example.com) can be circumvented by crafting malformed email addresses that parse incorrectly, granting unauthorized access when the application relies on naive email validation.

Summary generated and translated by AI from the official description.
The email module of Python through 3.11.3 incorrectly parses e-mail addresses that contain a special character. The wrong portion of an RFC2822 header is identified as the value of the addr-spec. In some applications, an attacker can bypass a protection mechanism in which application access is granted only after verifying receipt of e-mail to a specific domain (e.g., only @company.example.com addresses may be used for signup). This occurs in email/_parseaddr.py in recent versions of Python.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Affected products
n/a · n/a

Want to know if your infrastructure is exposed to this?

Talk to TrueHacking →