Skip to content
Heist/ feed
UnratedFix available

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

Type: advisorySource: OSV1 source record

### Impact `fast-uri`'s `mailto` scheme parser compares each query field name to the reserved names (`to`, `subject`, `body`) while the name is still percent-encoded, and only percent-decodes it when storing it as a generic header. On serialize, the decoded name is re-emitted, so a field name such as `%74o` (percent-encoded `to`) is not recognized as a recipient at parse time (`parse().to` shows only the legitimate recipient) but materializes as a literal `to=` field after `serialize()`, and reparsing then treats it as a recipient. The same technique smuggles `subject` and `body` through `%73ubject` and `%62ody`. An application that parses an untrusted mailto URI, makes a display, allowlist, or logging decision on `parse().to`, then re-serializes the result and passes the serialized string to a mail client or an outbound send path can gain an attacker-chosen recipient, subject, or body that was not visible when the recipient list was checked. A scanner inspecting the raw input for an extra `to=` sees nothing, because the injected field appears only after `fast-uri` serializes. ### Patches Upgrade to `fast-uri` 4.1.5. ### Workarounds Percent-decode and compare mailto field names case-insensitively before trusting `parse().to`, or re-check the recipient list on the serialized output rather than only on the initial parse, until upgrading.

Announced Group revision 1
Original source ↗

GHSA-jvvf-x445-j334

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: osv:GHSA-jvvf-x445-j334

fast-uri

Source reference: /affected/0/package/name

Affected versions
Not stated in this record
Fixed versions
4.1.5

Source reference: /affected/0/ranges

Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "ranges": [
      {
        "type": "SEMVER",
        "events": [
          {
            "introduced": "4.1.3"
          },
          {
            "fixed": "4.1.5"
          }
        ]
      }
    ],
    "package": {
      "name": "fast-uri",
      "purl": "pkg:npm/fast-uri",
      "ecosystem": "npm"
    },
    "database_specific": {
      "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-jvvf-x445-j334/GHSA-jvvf-x445-j334.json"
    }
  }
]
Related CVEs
CVE-2026-86818

Source reference: /aliases

Publisher severity

No explicit severity was provided.

Event
#33269 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement