mail-parser is vulnerable to Interpretation Conflict
65
Medium Risk
Sender-chosen header names are resolved through Python attribute lookup and rewritten before lookup, folding underscores to dashes and interpreting _json and _raw suffixes. A header named after a class method or carrying raw 8-bit bytes raises an exception outside the MailParser error hierarchy, so callers catching only library errors let the worker die, and header values can be silently dropped or replaced by another header's value while has_defects stays false, giving a detection-evasion primitive. The parsed output then diverges from the bytes actually present in the message. The fix looks up header names literally without attribute access or suffix interpretation, coerces 8-bit values to text before serialization, and initializes parser state before the message check.
You are affected if you are using a version that falls within the vulnerable range and parse untrusted email with this library.
mail-parser is vulnerable to Interpretation Conflict in versions 3.0.0 - 4.6.1.
Upgrade the mail-parser library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant