{"vuln_id":"GHSA-72px-j8gh-p79x","aliases":["CVE-2026-129297"],"description":"mail-parser: Sender IP address spoofing in get_server_ipaddress()","published_at":"2026-11-16T22:11:54Z","modified_at":"2026-11-16T22:11:55Z","first_seen_at":"2026-11-21T19:15:20.238593Z","severity":"high","severity_source":"ghsa","cvss_score":7.5,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","cwe":["CWE-20","CWE-345"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-72px-j8gh-p79x"},"matched_alias":null,"items":[{"id":2481,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-72px-j8gh-p79x / CVE-2026-129297: mail-parser: Sender IP address spoofing in get_server_ipaddress()","summary":"mail-parser: Sender IP address spoofing in get_server_ipaddress()\n\n### 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 — 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\ncandidate;\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\nsender-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\n`), 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 — the MTA's own logs, or SPF/DKIM/DMARC results computed\noutside this library.\n\nAffected packages: pip:mail-parser\nPatched: mail-parser 4.6.2","url":"https://github.com/advisories/GHSA-72px-j8gh-p79x","published_at":"2026-11-16T22:11:54Z","updated_at":"2026-11-16T22:11:55Z","fetched_at":"2026-11-21T19:15:18.416871Z","severity":"high","cvss_score":7.5,"epss":0.00202,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"mail-parser","vuln_id":"CVE-2026-129297","vuln_ids":["CVE-2026-129297","GHSA-72PX-J8GH-P79X"],"tags":["ghsa","pip","CWE-20","CWE-345"],"cluster_id":2404,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2481","html":"https://vulnwatch.ve1ve2.com/item/2481"}},{"id":6219,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-129297: mail-parser is a tool that parses emails by enhancing the Python standard library and extracting message details into a comprehensive object. Prior to 4.6.2, g…","summary":"mail-parser is a tool that parses emails by enhancing the Python standard library and extracting message details into a comprehensive object. Prior to 4.6.2, get_server_ipaddress() can select an attacker-controlled address from attacker-controlled Received headers. The minimum mechanism needed to distinguish this spoofing issue, derived from the advisory's remediation analysis and verified fix evidence, is appearance-based candidate selection that can treat bracketed IPv4 or IPv6 addresses or HELO markers in sender-written text as MTA-recorded addresses and can continue past a trusted hop that names no address. Applications that rely on the returned value can attribute a message to an attacker-selected sender IP address. This issue is fixed in version 4.6.2.\n\nReferences:\nhttps://github.com/SpamScope/mail-parser/commit/ce3cf3559db1ff806bda598b378de9f8c2a5be96\nhttps://github.com/SpamScope/mail-parser/pull/167\nhttps://github.com/SpamScope/mail-parser/releases/tag/4.6.2\nhttps://github.com/SpamScope/mail-parser/security/advisories/GHSA-72px-j8gh-p79x","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-129297","published_at":"2026-11-16T18:17:30.590000Z","updated_at":"2026-11-16T18:17:30.590000Z","fetched_at":"2026-11-21T19:15:31.481994Z","severity":"high","cvss_score":7.5,"epss":0.00202,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-129297","vuln_ids":["CVE-2026-129297","GHSA-72PX-J8GH-P79X"],"tags":["CWE-345"],"cluster_id":2405,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/6219","html":"https://vulnwatch.ve1ve2.com/item/6219"}}]}