Résumé
Mail: Email address spoofing via malformed RFC 2047 encoded-words
Détails de l’avis
Summary
Mail::Utilities.q_value_decode and Mail::Utilities.b_value_decode decoded only the first RFC 2047 encoded-word in a string and used an overly greedy pattern to match the charset token. A crafted, malformed encoded-word embedded in an address display name or local part could cause the decoded output to differ from what a human reviewer or downstream parser would expect, allowing an attacker to spoof the apparent sender/recipient address.
Details
Both decoders used a single String#match against a pattern such as /=?(.+)??[Qq]?(.*)?=/m. Two problems:
- Single match, dropped remainder. Only the first =?charset?Q?...?= (or ?B?) word was decoded. Any additional encoded-words or surrounding text were not handled consistently, so the decoded result could silently omit or alter parts of the input.
- Greedy charset capture. (.+)? is greedy and matches across ? delimiters, so a malformed word could span more of the string than a strict RFC 2047 parse would, changing the boundary between "encoded" and "literal" text.
Impact
Applications using mail to parse and display or authorize based on decoded header values (From, To, Reply-To, etc.) may present or act on an address different from the one a validator inspecting the raw header would see. Primary risk is spoofing / phishing and authorization-check bypass. No RCE.
Références
- https://github.com/advisories/GHSA-mvxr-6m87-mv2q
- https://github.com/mikel/mail/security/advisories/GHSA-mvxr-6m87-mv2q
- https://nvd.nist.gov/vuln/detail/CVE-2026-63435
- https://github.com/mikel/mail/pull/1664
- https://github.com/mikel/mail/commit/f9d59c2e447af42e2c3dec5a56b1bb25c7292859
- https://github.com/mikel/mail/releases/tag/2.9.1
Vulnérabilités liées
Tout Supply chain →- HIGHCVE-2026-100351
kin-openapi: ValidationHandler security-requirement bypass via encoded-path operation confusion
- MEDIUMGHSA-w253-m66g-rx24
Coraza: URL-encoded form Content-Type parameters bypass Coraza body inspection
- MEDIUMGHSA-3wr7-993q-jrff
Coraza: Multipart filename* (RFC 5987) charset restriction lets a decoy filename bypass FILES-based rules
- MEDIUMGHSA-g4qm-m288-5cp9
Coraza has Cookie Parser Confusion
- MEDIUMCVE-2026-107825
Coraza: ProcessURI silently drops QUERY_STRING and ARGS_GET on URI parse failure — defense-in-depth bypass for non-net/http integrations
- MEDIUMGHSA-5gj4-9gm7-2fx2
Coraza body processor has a JSON key collision that allows unauthenticated attackers to bypass OWASP CRS inspection