{"id":"GHSA-mvxr-6m87-mv2q","summary":"Mail: Email address spoofing via malformed RFC 2047 encoded-words","details":"## Summary\n\nMail::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.\n\n## Details\n\nBoth decoders used a single String#match against a pattern such as /\\=\\?(.+)?\\?[Qq]\\?(.*)\\?\\=/m. Two problems:\n\n1. 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.\n2. 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.\n\n## Impact\n\nApplications 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.","aliases":["CVE-2026-63435"],"modified":"2026-09-02T22:15:06.044446717Z","published":"2026-09-02T22:02:32Z","database_specific":{"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2026-09-02T22:02:32Z","nvd_published_at":"2026-09-01T21:18:35Z","cwe_ids":["CWE-436"]},"references":[{"type":"WEB","url":"https://github.com/mikel/mail/security/advisories/GHSA-mvxr-6m87-mv2q"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63435"},{"type":"WEB","url":"https://github.com/mikel/mail/pull/1664"},{"type":"WEB","url":"https://github.com/mikel/mail/commit/f9d59c2e447af42e2c3dec5a56b1bb25c7292859"},{"type":"PACKAGE","url":"https://github.com/mikel/mail"},{"type":"WEB","url":"https://github.com/mikel/mail/releases/tag/2.9.1"}],"affected":[{"package":{"name":"mail","ecosystem":"RubyGems","purl":"pkg:gem/mail"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.9.1"}]}],"versions":["1.0.0","1.1.0","1.2.1","1.2.5","1.2.6","1.2.8","1.2.9","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.4.0","1.4.1","1.4.2","1.4.3","1.5.0","1.5.1","1.5.2","1.5.3","1.5.4","1.6.0","2.0.3","2.0.5","2.1.0","2.1.1","2.1.2","2.1.3","2.1.5","2.1.5.1","2.1.5.2","2.1.5.3","2.2.0","2.2.1","2.2.10","2.2.11","2.2.12","2.2.13","2.2.14","2.2.15","2.2.16","2.2.17","2.2.18","2.2.19","2.2.2","2.2.20","2.2.3","2.2.4","2.2.5","2.2.5.1","2.2.5.2","2.2.6","2.2.6.1","2.2.7","2.2.9","2.2.9.1","2.3.0","2.3.2","2.3.3","2.4.0","2.4.1","2.4.3","2.4.4","2.5.2","2.5.3","2.5.4","2.5.5","2.5.5.rc1","2.6.0","2.6.1","2.6.3","2.6.4","2.6.4.rc1","2.6.4.rc2","2.6.5","2.6.5.rc1","2.6.6","2.6.6.rc1","2.7.0","2.7.0.rc1","2.7.0.rc2","2.7.0.rc3","2.7.1","2.7.1.rc1","2.8.0","2.8.0.1","2.8.0.1.rc1","2.8.0.rc1","2.8.0.rc2","2.8.0.rc3","2.8.1","2.8.1.rc2","2.9.0","2.9.0.beta1","2.9.0.beta2"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-mvxr-6m87-mv2q/GHSA-mvxr-6m87-mv2q.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"}]}