{"id":"CVE-2026-63435","aliases":["CVE-2026-63435","GHSA-mvxr-6m87-mv2q"],"related":[],"kind":"vulnerability","state":"published","title":"Mail: Email address spoofing via malformed RFC 2047 encoded-words","summary":"Mail is an internet library for Ruby designed to handle email generation, parsing, and sending. Prior to 2.9.1, Mail::Utilities.q_value_decode and Mail::Utilities.b_value_decode used a single String#match and an overly greedy charset capture to decode only the first RFC 2047 encoded-word and mishandle surrounding or subsequent text. A crafted malformed encoded-word in an address display name or local part could cross ? delimiters and make decoded From, To, or Reply-To header values differ from the raw values inspected by a human reviewer or downstream parser, enabling apparent sender or recipient spoofing, phishing, or authorization-check bypass. This issue is fixed in version 2.9.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Mail is an internet library for Ruby designed to handle email generation, parsing, and sending. Prior to 2.9.1, Mail::Utilities.q_value_decode and Mail::Utilities.b_value_decode used a single String#match and an overly greedy charset capture to decode only the first RFC 2047 encoded-word and mishandle surrounding or subsequent text. A crafted malformed encoded-word in an address display name or local part could cross ? delimiters and make decoded From, To, or Reply-To header values differ from the raw values inspected by a human reviewer or downstream parser, enabling apparent sender or recipient spoofing, phishing, or authorization-check bypass. This issue is fixed in version 2.9.1.","source":"cvelist"},{"lang":"en","text":"## 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.","format":"markdown","source":"ghsa"}],"published":"2026-09-01T20:09:20.820Z","modified":"2026-09-10T03:50:54.686Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-436"],"affected":[{"ranges":[{"version":"< 2.9.1","status":"affected"}],"vendor":"mikel","product":"mail","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.9.1"}],"ecosystem":"RubyGems","package":"mail","purl":"pkg:gem/mail","source":"ghsa"}],"references":[{"url":"https://github.com/mikel/mail/security/advisories/GHSA-mvxr-6m87-mv2q","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/mikel/mail/pull/1664","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/mikel/mail/commit/f9d59c2e447af42e2c3dec5a56b1bb25c7292859","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/mikel/mail/releases/tag/2.9.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63435","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/mikel/mail","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-09-02T15:44:44.094Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-63435","url":"https://www.cve.org/CVERecord?id=CVE-2026-63435","licence":"CVE Terms of Use","modified":"2026-09-02T15:44:56.368Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mvxr-6m87-mv2q","url":"https://github.com/advisories/GHSA-mvxr-6m87-mv2q","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:54.686Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-63435","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63435","licence":"Public domain","modified":"2026-09-09T21:09:13.080Z"}],"updatedAt":"2026-11-25T22:59:36.015Z","epss":{"score":0.00336,"percentile":0.28863,"date":"2026-12-01T12:00:22.000Z"}}