Files
vuln-osv/data/PyPI/GHSA-72px-j8gh-p79x.json
T

1 line
3.4 KiB
JSON

{"schema_version":"1.9.2","id":"GHSA-72px-j8gh-p79x","published":"2026-11-16T22:11:54Z","modified":"2026-11-16T22:15:05.618811010Z","aliases":["CVE-2026-129297"],"summary":"mail-parser: Sender IP address spoofing in get_server_ipaddress()","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 — 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 <that address>`), 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.","affected":[{"package":{"name":"mail-parser","ecosystem":"PyPI","purl":"pkg:pypi/mail-parser"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.6.2"}]}],"versions":["0.5.0","1.0.0","1.0.0rc1","1.1.0","1.1.1","1.1.10","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8","1.1.9","1.2.0","1.2.1","1.2.2","1.2.4","1.2.5","1.2.6","2.0.0","2.0.1","2.1.0","3.0.0","3.1.0","3.10.0","3.11.0","3.12.0","3.13.0","3.14.0","3.15.0","3.2.0","3.2.1","3.2.2","3.2.3","3.2.4","3.2.5","3.2.6","3.2.7","3.3.0","3.3.1","3.3.2","3.3.3","3.4.0","3.4.1","3.5.0","3.5.1","3.6.0","3.6.1","3.7.0","3.7.1","3.8.0","3.8.1","3.9.0","3.9.1","3.9.2","3.9.3","4.0.0","4.1.0","4.1.2","4.1.3","4.1.4","4.2.0","4.2.1","4.3.0","4.4.0","4.5.0","4.6.0","4.6.1"],"database_specific":{"last_known_affected_version_range":"<= 4.6.1","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-72px-j8gh-p79x/GHSA-72px-j8gh-p79x.json"}}],"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"}],"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"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"}]}