Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-mvxr-6m87-mv2q

Опубликовано: 02 сент. 2026
Источник: github
Github: Прошло ревью
CVSS3: 5.3

Описание

Mail: Email address spoofing via malformed RFC 2047 encoded-words

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:

  1. 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.
  2. 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.

Пакеты

Наименование

mail

rubygems
Затронутые версииВерсия исправления

< 2.9.1

2.9.1

EPSS

Процентиль: 25%
0.00328
Низкий

5.3 Medium

CVSS3

Дефекты

CWE-436

Связанные уязвимости

CVSS3: 5.3
ubuntu
2 дня назад

(Mail is an internet library for Ruby designed to handle email generati ...)

CVSS3: 5.3
nvd
2 дня назад

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.

CVSS3: 5.3
debian
2 дня назад

Mail is an internet library for Ruby designed to handle email generati ...

EPSS

Процентиль: 25%
0.00328
Низкий

5.3 Medium

CVSS3

Дефекты

CWE-436