PT-2026-148361
CVE-2026-129300
·
Published
2026-11-16
·
Updated
2026-11-16
Description by
CVSS 3.1
5.3
MediumMetricsAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Name of the Vulnerable Software and Affected Versions
mail-parser versions 3.7.0 through 4.6.2
Description
An issue exists where the
receiveds format() function in src/mailparser/utils.py fails to properly handle certain exceptions during the conversion of the trailing date in a Received header. Specifically, the function only catches TypeError and ValueError, but an attacker-controlled header with an out-of-range year can cause calendar.timegm() to raise an OverflowError, and a large timezone offset can cause datetime.fromtimestamp() to raise an OSError. Because these exceptions fall outside the MailParserError hierarchy, a single crafted header can abort the parsing of the entire message across all entry points, including parse from string(), parse from bytes(), parse from file(), parse from file obj(), and the CLI. This can lead to the loss of messages or the dropping of queued batches in pipelines parsing untrusted mail.Recommendations
Update mail-parser to version 4.6.3.
As a temporary workaround, wrap every
parse from * call in a bare except Exception block instead of except MailParserError and treat the affected message as unparsed. Found an issue in the description? Have something to add? Feel free to write us 👾