Vulnerabilities in pkg:gem/mail

PACKAGE
Advisory Identifier: GHSA-mvxr-6m87-mv2q
Advisory Summary

CVE-2026-63435 is a MODERATE (CVSS 5.3) email address spoofing vulnerability (CWE-436: Interpretation Conflict) affecting Mail libraries in the RubyGems ecosystem. The issue involves email address spoofing via malformed rfc 2047 encoded-words. Remediation is available by upgrading affected packages to version 2.9.1.

5 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/mail

5 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/mail. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-mvxr-6m87-mv2q CVE-2026-63435 MODERATE Mail: Email address spoofing via malformed RFC 2047 encoded-words
GHSA-rp63-jfmw-532w CVE-2012-2140 HIGH Mail Gem Improper Input Validation vulnerability
GHSA-cj92-c4fj-w9c5 CVE-2012-2139 MODERATE Mail Gem Path Traversal vulnerability
GHSA-q86f-fmqf-qrf6 CVE-2015-9097 MODERATE Mail Gem CRLF Injection vulnerability
GHSA-cpjc-p7fc-j9xh CVE-2011-0739 MODERATE Mail Improper Input Validation vulnerability

CVE-2026-63435 at a Glance

CVE Identifier CVE-2026-63435
GHSA Identifier GHSA-mvxr-6m87-mv2q
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-436: Interpretation Conflict
Affected Product Mail
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-63435

To remediate this vulnerability, upgrade all affected Mail dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mail fixed: 2.9.1
Upgrade mail to 2.9.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for mail

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-63435, inspect your project dependencies for Mail:

inspect dependencies for mail

Analyze the terminal output to locate any version of Mail in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-436: Interpretation Conflict, where product a handles inputs or steps differently than product b, which causes a to perform incorrect actions based on its perception of b's state. In Mail, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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.

CVE-2026-63435 Affected Mail Versions

1 component(s)
Fixed Versions:
2.9.1
Product / Package Ecosystem Affected Versions Fixed Version
mail
RubyGems
< 2.9.1
2.9.1

References

Frequently Asked Questions

What is CVE-2026-63435?
CVE-2026-63435 is a security vulnerability in Mail involving Email address spoofing via malformed RFC 2047 encoded-words under CWE-436: Interpretation Conflict.
Which Mail versions are affected?
Affected versions include releases prior to 2.9.1 across affected packages: mail.
What version fixes CVE-2026-63435?
Upgrading to 2.9.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mail affected?
Yes, mail is affected in releases prior to 2.9.1. Upgrade your dependency to 2.9.1 or later.
What is the CVSS score of CVE-2026-63435?
CVE-2026-63435 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-63435?
CVE-2026-63435 is classified under CWE-436: Interpretation Conflict (Product A handles inputs or steps differently than Product B, which causes A to perform incorrect actions based on its perception of B's state.).
How can I check RubyGems dependencies for CVE-2026-63435?
Run the dependency tree command: 'inspect dependencies for mail'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mvxr-6m87-mv2q",
  "modified" : "2026-09-02T22:02:32Z",
  "published" : "2026-09-02T22:02:32Z",
  "aliases" : [ "CVE-2026-63435" ],
  "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "mail"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.9.1"
      } ]
    } ]
  } ],
  "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"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-436" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-02T22:02:32Z",
    "nvd_published_at" : "2026-09-01T21:18:35Z"
  }
}