CVE-2026-86818
fast-uri vulnerable to mailto header injection via percent-encoded field-name desynchronization
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
4.8
fast-uri vulnerable to mailto header injection via percent-encoded field-name desynchronization
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.
- Record
CVE-2026-86818- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-172, CWE-436
- Updated
- 2026-11-02
EUVDEUVD-2026-78403
4.8
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.
- Record
EUVD-2026-78403- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-jvvf-x445-j334
4.8
fast-uri vulnerable to mailto header injection via percent-encoded field-name desynchronization
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.
- Record
GHSA-jvvf-x445-j334- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-172, CWE-436
- Updated
- 2026-11-02
NVD
4.8
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.
- Record
CVE-2026-86818- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-172, CWE-436
- Updated
- 2026-11-02
OSV
4.8
fast-uri vulnerable to mailto header injection via percent-encoded field-name desynchronization
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.
- Record
CVE-2026-86818- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-172, CWE-436
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-86818
4.8
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.
- Record
DEBIAN-CVE-2026-86818- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
OSVGHSA-jvvf-x445-j334
4.8
fast-uri vulnerable to mailto header injection via percent-encoded field-name desynchronization
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.
- Record
GHSA-jvvf-x445-j334- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - Weakness
- CWE-172, CWE-436
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-86818
4.8
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.
- Record
UBUNTU-CVE-2026-86818- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
fast-urinpm |
4.1.3 up to 4.1.5 | 4.1.5 |
node-ajvDebian:13 |
All versions, plus listed versions 8.12.0~ds+~2.1.1-58.17.1~ds+~3.0.1+~3.1.0-18.17.1~ds+~3.0.1+~3.1.0-28.17.1~ds+~3.0.1+~3.1.0-38.17.1~ds+~3.0.1+~3.1.0-4 Show 10 moreShow less8.18.0~ds+~cs6.1.1-18.18.0~ds+~cs6.1.1-28.20.0~ds+~cs6.1.3-18.20.0~ds+~cs7.1.2-18.20.0~ds+~cs7.1.3-18.20.0~ds+~cs7.1.3-28.20.0~ds+~cs7.1.3-38.20.0~ds+~cs7.1.4-18.20.0~ds+~cs7.1.5-18.20.0~ds+~cs7.1.6-1 |
None known |
node-ajvDebian:14 |
before 8.20.0~ds+~cs7.1.6-1, plus listed versions 8.12.0~ds+~2.1.1-58.17.1~ds+~3.0.1+~3.1.0-18.17.1~ds+~3.0.1+~3.1.0-28.17.1~ds+~3.0.1+~3.1.0-38.17.1~ds+~3.0.1+~3.1.0-4 Show 9 moreShow less8.18.0~ds+~cs6.1.1-18.18.0~ds+~cs6.1.1-28.20.0~ds+~cs6.1.3-18.20.0~ds+~cs7.1.2-18.20.0~ds+~cs7.1.3-18.20.0~ds+~cs7.1.3-28.20.0~ds+~cs7.1.3-38.20.0~ds+~cs7.1.4-18.20.0~ds+~cs7.1.5-1 |
8.20.0~ds+~cs7.1.6-1 |
node-ajvUbuntu:18.04:LTS |
All versions, plus listed versions 5.0.0-1 |
None known |
node-ajvUbuntu:20.04:LTS |
All versions, plus listed versions 6.10.2-1 |
None known |
node-ajvUbuntu:22.04:LTS |
All versions, plus listed versions 6.12.6-26.12.6-3 |
None known |
node-ajvUbuntu:24.04:LTS |
All versions, plus listed versions 6.12.6-38.12.0~ds+~2.1.1-4 |
None known |
node-ajvUbuntu:26.10 |
All versions, plus listed versions 8.17.1~ds+~3.0.1+~3.1.0-4build18.20.0~ds+~cs6.1.3-18.20.0~ds+~cs7.1.2-18.20.0~ds+~cs7.1.3-18.20.0~ds+~cs7.1.3-3 |
None known |
node-ajvUbuntu:26.04:LTS |
All versions, plus listed versions 8.12.0~ds+~2.1.1-58.17.1~ds+~3.0.1+~3.1.0-28.17.1~ds+~3.0.1+~3.1.0-4build1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-86818 is a medium vulnerability (CVSS 4.8) in Fast-uri, published September 15, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.25%, the 16th percentile. Fixed in fast-uri 4.1.5.
References
github.com/fastify/fast-uri/security/advisories/GHSA-jvvf-x445-j334
cna.openjsf.org/security-advisories.html
nvd.nist.gov/vuln/detail/CVE-2026-86818
github.com/fastify/fast-uri/commit/f40a88f33e684a46faec3f5b820bcbb1e85add64
github.com/fastify/fast-uri/releases/tag/v4.1.5
github.com/advisories/GHSA-jvvf-x445-j334