CVE-2026-86818

fast-uri vulnerable to mailto header injection via percent-encoded field-name desynchronization

Published Sep 15, 2026 CVSS 3.1 · 4.8 Medium EPSS < 1% KEV · Not listed
Description
fast-uri is a dependency-free RFC 3986 URI parser for Node.js, used by Fastify and ajv, that added a mailto scheme parser in version 4.1.3. In versions 4.1.3 and 4.1.4, the mailto parser compares each query field name to the reserved names to, subject, and body while the name is still percent-encoded, and decodes it only when storing it as a generic header, so a percent-encoded spelling of a reserved field name is not recognized as that field at parse time but is re-emitted as the literal field name when the parsed URI is serialized. An application that validates, logs, or displays the recipient list from the first parse and then serializes the URI and sends it can silently gain an attacker-chosen recipient, and the subject and body fields can be smuggled across the same roundtrip. The issue is fixed in fast-uri 4.1.5, and users should upgrade to 4.1.5 or later. As a workaround, do not act on a mailto URI that fast-uri has re-serialized without first decoding and re-validating its recipient, subject, and body fields.

Analysis

AI-generated

Technical impact

The vulnerable fast‑uri library’s mailto parser compares query field names against reserved keys such as to, subject, and body while the names remain percent‑encoded, and only decodes them when storing them as generic headers. Consequently, a percent‑encoded spelling of a reserved field is not noticed during initial parsing but is emitted verbatim when the URI is re‑serialized. An application that validates, logs, or displays recipients from the first parse and later re‑serializes the URI before sending can silently add an attacker‑chosen recipient, subject, or body, enabling email injection.

Affected Systems

The issue affects the fast‑uri library used by Fastify, ajv, and other Node.js projects. Vulnerable releases are 4.1.3 and 4.1.4; version 4.1.5 and later contain the fix.

Risk and Exploitability

The CVSS score of 4.8 classifies the flaw as moderate severity. The EPSS value of <1% indicates a low probability of exploitation at the present time, and the vulnerability is not listed in the CISA KEV catalog. Attackers must provide a crafted mailto URL, which the application parses, stores, and later re‑serializes for outbound email. The flaw is a logic error rather than an externally exploitable network vulnerability, but any code that accepts user‑supplied mailto links without re‑validation is at risk of covert recipient injection.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade fast‑uri to 4.1.5 or later.
  • If an upgrade cannot be performed immediately, decode the mailto URI’s recipient, subject, and body fields before any logging, display, or transmission, and validate that the decoded values conform to expected patterns.
  • As a temporary safeguard, avoid acting on a re‑serialized mailto URI that originates from fast‑uri without first re‑parsing and verifying its components.
  • Consider isolating mailto parsing in a separate trusted process and restricting the data that can be coalesced into the final URI that is sent.

Generated by OpenCVE AI on September 20, 2026 at 17:44 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-jvvf-x445-j334 fast-uri vulnerable to mailto header injection via percent-encoded field-name desynchronization
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Fast-uri
Fast-uri fast-uri
Vendors & Products Fast-uri
Fast-uri fast-uri
Type Values Removed Values Added
Description fast-uri is a dependency-free RFC 3986 URI parser for Node.js, used by Fastify and ajv, that added a mailto scheme parser in version 4.1.3. In versions 4.1.3 and 4.1.4, the mailto parser compares each query field name to the reserved names to, subject, and body while the name is still percent-encoded, and decodes it only when storing it as a generic header, so a percent-encoded spelling of a reserved field name is not recognized as that field at parse time but is re-emitted as the literal field name when the parsed URI is serialized. An application that validates, logs, or displays the recipient list from the first parse and then serializes the URI and sends it can silently gain an attacker-chosen recipient, and the subject and body fields can be smuggled across the same roundtrip. The issue is fixed in fast-uri 4.1.5, and users should upgrade to 4.1.5 or later. As a workaround, do not act on a mailto URI that fast-uri has re-serialized without first decoding and re-validating its recipient, subject, and body fields.
Title fast-uri vulnerable to mailto header injection via percent-encoded field-name desynchronization
Weaknesses CWE-172
CWE-436
References
Metrics cvssV3_1

{'score': 4.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N'}

Weaknesses
  • CWE-172

    Encoding Error

  • CWE-436

    Interpretation Conflict

  • CWE-838

    Inappropriate Encoding for Output Context

Sources

Status
PUBLISHED
Assigner
openjs
Published
Updated
Sep 15, 2026, 12:31 PM
Reserved
Sep 8, 2026, 1:53 PM
Status
Awaiting Analysis
Published
Sep 15, 2026, 11:17 AM
Modified
Sep 16, 2026, 7:40 PM
Severity
Moderate
Public date
Sep 15, 2026, 10:40 AM