Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-72px-j8gh-p79x
Patches
Fixed in 4.6.2. Upgrade with pip install --upgrade mail-parser.
Candidate addresses are now selected by position, not by appearance — a bracketed address the sender wrote is byte-identical to one the MTA wrote, so no amount of pattern matching can tell them apart:
- the first token of the
fromclause is the HELO name, whatever its shape, and is never a candidate; - an explicit HELO marker inside a comment group is sender text and is excluded;
- a candidate must sit inside a
(/[group; - IPv4 and IPv6 matches are merged positionally, never family-first;
- the walk stops at the first trusted hop naming no address, rather than continuing into sender-written headers.
The IPv6 pattern was corrected to skip the IPv6: tag and to prefer the longest valid form.
Behaviour change. get_server_ipaddress() now returns None rather than an unreliable
value in two cases that previously returned an address: a from clause consisting of a bare
address with no HELO marker (indistinguishable from EHLO <that address>), and a trusted hop
naming no address at all. Callers must handle None.
Workarounds
None within mail-parser. Callers who cannot upgrade should not treat the return value of
get_server_ipaddress() as trustworthy, and should derive sender attribution from an
authenticated signal instead — the MTA's own logs, or SPF/DKIM/DMARC results computed
outside this library.
Upload your own SBOM in CycloneDX 1.6 or higher (JSON) directly here to check your vulnerabilities.
Drag and drop some file here, or click to select
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a high impact on the integrity of the data.
Exploitation attempts have been detected. Elevated vigilance and prompt remediation are advised.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard