CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-86818

CVE-2026-86818: Mailto Header Injection via Percent-Encoded Field-Name Desynchronization in fast-uri

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 30, 2026·6 min read·23 visits

Executive Summary (TL;DR)

A validation discrepancy in fast-uri allows remote attackers to smuggle mailto parameters such as 'to', 'subject', and 'body' by using percent-encoded names like '%74o', bypassing safety validations before serialization.

A security-critical desynchronization vulnerability exists in fast-uri versions 4.1.3 and 4.1.4. Due to incorrect order-of-operations, the mailto scheme parser validates raw percent-encoded parameter keys instead of normalized keys, but subsequently decodes and writes them into a generic headers object. When the parsed URI is serialized, these keys are re-emitted literally, allowing attackers to bypass validation boundaries and smuggle unauthorized recipients, subjects, or body parameters in downstream mailing applications.

Vulnerability Overview

The npm package fast-uri is a dependency-free RFC 3986 URI parsing and serialization toolbox for Node.js. It serves as a performance-critical dependency for several high-volume ecosystem packages, including the Fastify web framework and the ajv JSON schema validator. In version 4.1.3, the package introduced a dedicated parser to handle the mailto URI scheme.

During its parsing operations, fast-uri separates standard, reserved mailto query parameters—specifically to, subject, and body—from user-defined, generic headers. This separation is critical for downstream applications that rely on the parsed output to validate email destinations and enforce local delivery policies before executing mail actions.

The vulnerability is classified under a combination of CWE-172 (Encoding Error) and CWE-436 (Interpretation Conflict). Because the library compares incoming query keys to reserved keys while they are still percent-encoded, it fails to recognize encoded reserved words. The subsequent decoding of these keys prior to internal storage creates an interpretation conflict between the validation phase and the serialization phase.

Root Cause Analysis

The root cause of this flaw lies in the sequencing of percent-decoding relative to token validation within the mailtoParse function. When processing a query parameter string such as ?%74o=attacker@evil.test, the parser extracts the key as %74o and compares it directly against string literals.

Because %74o does not literally match the string "to", the parser classifies the parameter as a generic, non-reserved header. However, during the storage phase, the parser executes decodeHex() on the key, which translates %74o to "to". This decoded key is then stored in a generic headers map as headers["to"] = "attacker@evil.test".

This discrepancy creates a desynchronization between the structured fields of the parsed object. An application auditing parsed.to will only observe the legitimate, safe recipients, while the malicious recipient remains hidden inside parsed.headers.to. When the object is passed to mailtoSerialize, the serializer loops over the keys of the headers map, encodes them, and appends them to the query string, re-emitting the literal to=attacker@evil.test parameter.

Code Analysis

A review of the vulnerable implementation in lib/schemes.js reveals the processing loop that causes the discrepancy:

// Vulnerable parsing logic in fast-uri v4.1.4
const name = eqIdx === -1 ? token : token.slice(0, eqIdx);
const value = eqIdx === -1 ? '' : token.slice(eqIdx + 1);
if (name === 'to') {
  const addrs = value.split(',');
  for (let j = 0; j < addrs.length; j++) to.push(addrs[j]);
  continue;
}
if (name === 'subject') {
  mailtoComponent.subject = decodeHex(value);
  continue;
}
if (name === 'body') {
  mailtoComponent.body = decodeHex(value);
  continue;
}
if (headers === null) headers = (Object.create(null));
headers[decodeHex(name)] = decodeHex(value);

In the block above, the variable name is compared to 'to', 'subject', and 'body' without prior decoding. If the attacker passes %74o, these comparisons evaluate to false. The execution path falls through to the final lines, where decodeHex(name) translates the key to 'to' and writes it into the headers dictionary.

The fix introduced in 4.1.5 corrects this by decoding the parameter name before performing any logic checks, while also adding lower-case normalization to prevent case-based bypasses (e.g., TO or To escaping detection):

// Corrected parsing logic in fast-uri v4.1.5
const name = decodeHex(eqIdx === -1 ? token : token.slice(0, eqIdx));
const normalizedName = name.toLowerCase();
const value = eqIdx === -1 ? '' : token.slice(eqIdx + 1);
if (normalizedName === 'to') {
  const addrs = value.split(',');
  for (let j = 0; j < addrs.length; j++) to.push(addrs[j]);
  continue;
}

Exploitation Methodology & Bypass Vector

Exploitation relies on a common software pattern: an application receives a URI, parses it to extract and validate properties, serializes the validated object back into a string, and then executes or transmits that string to a downstream system.

Consider an application that validates target email addresses against an internal allowlist. If the input is mailto:admin@company.com?%74o=attacker@evil.test, the validation system queries the parsed representation. The library returns parsed.to = ['admin@company.com'], which successfully matches the allowlist of @company.com.

// Conceptual application bypass flow
const parsed = fastURI.parse("mailto:admin@company.com?%74o=attacker@evil.test");
console.log(parsed.to); // ['admin@company.com'] -> Safe domain check passes
 
// Serialization generates the final payload
const finalURI = fastURI.serialize(parsed);
console.log(finalURI); // "mailto:admin@company.com?to=attacker@evil.test"

Because the verification logic only inspected the primary to array, the injected address hidden in headers.to bypassed the filter. Upon serialization, the library constructs a string containing two valid destination arguments, instructing the executing client to route the message to the unauthorized recipient.

Impact Assessment

The overall impact of CVE-2026-86818 depends heavily on the context of the downstream processing application. When used within automated registration, notification, or support-ticket workflows, this desynchronization allows attackers to force the sending of notifications to arbitrary accounts.

Attackers can leverage this bypass to intercept confidential emails by adding unauthorized CC or BCC entries. If the system constructs sensitive notifications containing password resets or system data, an attacker can append their email as a primary recipient through the serialized parameter injection.

The CVSS v3.1 vector is rated as 4.8 (Medium severity). Because exploitation requires a specific configuration where an application parses, validates, and subsequently re-serializes the mailto link prior to execution, the attack complexity is classified as High (AC:H). This vulnerability does not present opportunities for direct remote code execution or privilege escalation within the Node.js runtime itself.

Remediation & Patch Verification

To fully resolve CVE-2026-86818, developers must upgrade fast-uri to version 4.1.5 or later. This release addresses both the parsing order-of-operations and serialization canonicalization to ensure identical representations during both phases.

Because fast-uri is heavily utilized as a transitive dependency, standard direct updates may not immediately remediate nested packages. To enforce the updated library across the dependency tree, developers can utilize package manager overrides:

{
  "overrides": {
    "fast-uri": "^4.1.5"
  }
}

For environments where immediate updates are blocked, a manual mitigation policy must be implemented. Applications should sanitise user-supplied URIs by decoding and verifying all elements inside the nested headers object, or by stripping any occurrences of to, subject, or body from the headers map prior to serialization.

Fix Analysis (3)

Technical Appendix

CVSS Score
4.8/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N

Affected Systems

fast-uri versions 4.1.3 and 4.1.4Node.js applications parsing mailto schemas with fast-uriDownstream packages containing transient dependencies on fast-uri v4.1.3/v4.1.4, including Fastify and ajv

Affected Versions Detail

Product
Affected Versions
Fixed Version
fast-uri
Fastify / OpenJS Foundation
>= 4.1.3, <= 4.1.44.1.5
AttributeDetail
CWE IDCWE-172 / CWE-436
Attack VectorNetwork (AV:N)
CVSS v3.1 Score4.8
Exploitability Subscore2.2
Impact Subscore2.5
Exploit Statuspoc
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1566.002Phishing: Spearphishing Link
Initial Access
T1036Masquerading
Defense Evasion
CWE-436
Interpretation Conflict

The software processes data encoded in multiple formats and does not properly normalize or decode the payload before performing critical parsing operations, causing an interpretation mismatch between security validation and serialization.

Known Exploits & Detection

GitHub AdvisoryDetails on reproducing the parser desynchronization using percent-encoded parameters

References & Sources

  • [1]GHSA-jvvf-x445-j334: mailto header/parameter injection via percent-encoded field-name desynchronization
  • [2]NVD - CVE-2026-86818 Detail
  • [3]CVE.org Record - CVE-2026-86818
  • [4]OpenJS Foundation Security Advisories
  • [5]fast-uri Release v4.1.5
  • [6]Wiz Vulnerability Database: CVE-2026-86818

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•less than a minute ago•CVE-2026-128068
5.3

CVE-2026-128068: Regular Expression Denial of Service in rails-html-sanitizer

CVE-2026-128068 (GHSA-cpgf-5mjf-73p7) is a Regular Expression Denial of Service (ReDoS) vulnerability in the rails-html-sanitizer Ruby gem affecting versions 1.0.3 through 1.7.1. The flaw resides in the Rails::HTML::PermitScrubber#scrub_attribute method, which uses the multiline regular expression /^\s*[^#\s].*/m to enforce local-only URI fragment references on SVG elements. On Ruby runtimes prior to version 3.2 (CRuby <= 3.1 and JRuby), evaluating an attribute value composed of repeated newline and whitespace characters without a hash character triggers quadratic backtracking O(n^2). Applications are only vulnerable if their sanitization allowlist is explicitly configured to permit SVG reference elements such as <use> alongside href or xlink:href attributes.

Alon Barad
Alon Barad
0 views•9 min read
•about 1 hour ago•CVE-2026-126360
5.3

CVE-2026-126360: Regular Expression Denial of Service in OpenTelemetry Python opentelemetry-api

CVE-2026-126360 (GHSA-mf5v-w3w3-f6cg) is an algorithmic complexity vulnerability (Regular Expression Denial of Service) in the trace context propagation logic of the opentelemetry-api package within the OpenTelemetry Python ecosystem. In versions prior to 1.45.2, the TraceContextTextMapPropagator.extract() method utilizes a regular expression susceptible to quadratic-time backtracking when parsing malformed W3C traceparent headers containing long sequences of whitespace followed by an embedded newline character. In Python applications—particularly those using single-threaded asynchronous event loops—an unauthenticated remote attacker transmitting payloads over newline-preserving carriers can monopolize CPU execution and induce application-level Denial of Service.

Alon Barad
Alon Barad
2 views•10 min read
•about 2 hours ago•CVE-2026-126359
3.4

CVE-2026-126359: Cross-Site Scripting via Split Closing Style Tag in Hono CSS Helper

CVE-2026-126359 (GHSA-3gg2-335m-rxc6) is an improper input neutralization vulnerability (CWE-79) in the Hono web framework (`honojs/hono`). Versions from 3.12.0 prior to 4.13.16 evaluate and escape interpolated strings in the `hono/css` helper individually before concatenating template chunks and stripping CSS comments. When a `<` character and a `/style>` sequence are split across template boundaries, adjacent interpolations, or separated by a CSS comment, the sanitizer fails to escape the closing tag sequence. During Server-Side Rendering (SSR), the `<Style />` component outputs an unescaped `</style>` delimiter, permitting an attacker to break out of the CSS raw text context and execute arbitrary HTML and JavaScript in the victim's browser.

Alon Barad
Alon Barad
4 views•10 min read
•about 3 hours ago•CVE-2026-126358
5.3

CVE-2026-126358: Authorization Bypass via Wildcard Middleware Omission in Hono RegExpRouter

An incorrect authorization vulnerability (CWE-863) exists in the Hono web application framework (npm package `hono`) from version 4.1.4 prior to 4.13.16. Flaws in the registration-time coverage calculation and regular expression compilation within `RegExpRouter` cause wildcard middleware to be omitted under three specific routing conditions: parameter pattern equivalence mismatches, wildcard boundary collisions, and request paths containing percent-encoded line terminators. Because Hono's default `SmartRouter` selects `RegExpRouter` for most standard web applications, unauthenticated remote clients can bypass authentication, authorization, or security middleware registered on wildcard paths to directly access protected route handlers or the application's not-found handler.

Alon Barad
Alon Barad
5 views•13 min read
•about 4 hours ago•CVE-2026-126357
5.3

CVE-2026-126357: Authentication Bypass via Mount Path Transformation in Hono

CVE-2026-126357 (GHSA-4m76-xfj5-7975) is an authentication bypass vulnerability in the Hono web application framework prior to version 4.13.16. The flaw resides in the prefix-stripping and URL reconstruction logic of `app.mount()` and the `mount()` middleware. Two distinct path transformation errors—static route-pattern length slicing on dynamic prefixes and URL normalization of decoded pathnames—create a routing discrepancy between the outer Hono router and the mounted sub-application. An unauthenticated attacker can exploit these discrepancies to bypass outer authentication or authorization middleware and access protected inner routes directly.

Amit Schendel
Amit Schendel
5 views•9 min read
•about 5 hours ago•CVE-2026-126356
5.3

CVE-2026-126356: Multipart Form Validation Bypass in Hono Web Framework

A parser differential vulnerability exists in the Hono web application framework versions 4.5.1 prior to 4.13.16. The built-in form validation middleware (`validator('form')`) utilizes an overly restrictive regular expression to evaluate the HTTP `Content-Type` header for `multipart/form-data` payloads. When a client supplies additional valid MIME parameters (such as `charset=utf-8`) or multiple whitespace characters following a semicolon delimiter, the regular expression fails to match. Consequently, the validator passes an empty object to the validation callback instead of the parsed form fields. If the validation logic permits empty objects or only checks for disallowed values on optional properties, the request passes validation, allowing downstream route handlers calling `c.req.parseBody()` or `c.req.formData()` to process unvalidated user input.

Amit Schendel
Amit Schendel
5 views•10 min read