GHSA-72PX-J8GH-P79X
Vulnerability from github – Published: 2026-11-16 22:11 – Updated: 2026-11-16 22:11Patches
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.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 4.6.1"
},
"package": {
"ecosystem": "PyPI",
"name": "mail-parser"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.6.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-129297"
],
"database_specific": {
"cwe_ids": [
"CWE-20",
"CWE-345"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-16T22:11:54Z",
"nvd_published_at": "2026-11-16T18:17:30Z",
"severity": "HIGH"
},
"details": "### Patches\n\nFixed in **4.6.2**. Upgrade with `pip install --upgrade mail-parser`.\n\nCandidate addresses are now selected by position, not by appearance \u2014 a bracketed address\nthe sender wrote is byte-identical to one the MTA wrote, so no amount of pattern matching\ncan tell them apart:\n\n- the first token of the `from` clause is the HELO name, whatever its shape, and is never a\n candidate;\n- an explicit HELO marker inside a comment group is sender text and is excluded;\n- a candidate must sit inside a `(` / `[` group;\n- IPv4 and IPv6 matches are merged positionally, never family-first;\n- the walk stops at the first trusted hop naming no address, rather than continuing into\n sender-written headers.\n\nThe IPv6 pattern was corrected to skip the `IPv6:` tag and to prefer the longest valid form.\n\n**Behaviour change.** `get_server_ipaddress()` now returns `None` rather than an unreliable\nvalue in two cases that previously returned an address: a `from` clause consisting of a bare\naddress with no HELO marker (indistinguishable from `EHLO \u003cthat address\u003e`), and a trusted hop\nnaming no address at all. Callers must handle `None`.\n\n### Workarounds\n\nNone within mail-parser. Callers who cannot upgrade should not treat the return value of\n`get_server_ipaddress()` as trustworthy, and should derive sender attribution from an\nauthenticated signal instead \u2014 the MTA\u0027s own logs, or SPF/DKIM/DMARC results computed\noutside this library.",
"id": "GHSA-72px-j8gh-p79x",
"modified": "2026-11-16T22:11:54Z",
"published": "2026-11-16T22:11:54Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/SpamScope/mail-parser/security/advisories/GHSA-72px-j8gh-p79x"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-129297"
},
{
"type": "WEB",
"url": "https://github.com/SpamScope/mail-parser/pull/167"
},
{
"type": "WEB",
"url": "https://github.com/SpamScope/mail-parser/commit/ce3cf3559db1ff806bda598b378de9f8c2a5be96"
},
{
"type": "PACKAGE",
"url": "https://github.com/SpamScope/mail-parser"
},
{
"type": "WEB",
"url": "https://github.com/SpamScope/mail-parser/releases/tag/4.6.2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "mail-parser: Sender IP address spoofing in get_server_ipaddress()"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.