Skip to content
Heist/ feed
Back to feed
Medium

fast-uri vulnerable to inconsistent host case normalization via percent-encoded octets

Type: advisorySources: OSV

fast-uri is a dependency-free RFC 3986 URI parser for Node.js, used by Fastify and ajv. In versions before 2.4.7, from 3.0.0 through 3.1.7, and from 4.0.0 through 4.1.4, fast-uri folds the host to lowercase before it percent-decodes the host, so a percent-encoded uppercase octet such as %41 decodes to a literal A that is never folded. For a scheme-relative reference such as //host there is no scheme, so the host canonicalization that would normally repair this does not run, and parse, normalize, and equal then disagree on the same host. An application that makes a case-sensitive host decision on fast-uri output, for example a host allowlist or denylist that compares the parsed host or uses equal, can be steered past the check with a percent-encoded uppercase octet, and because hostnames are case-insensitive in DNS and HTTP the evading spelling still reaches the host the check meant to gate. The issue is fixed in fast-uri 2.4.7, 3.1.8, and 4.1.5, and users should upgrade to one of those versions or later. As a workaround, compare hosts case-insensitively by lowercasing the parsed host before any allowlist or denylist decision.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-86472
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 02:19 UTC · Revision 1

Source evidence

fast-uri vulnerable to inconsistent host case normalization via percent-encoded octets

core-osv · Original source

Published 15 Sept 2026, 10:29 UTC

fast-uri is a dependency-free RFC 3986 URI parser for Node.js, used by Fastify and ajv. In versions before 2.4.7, from 3.0.0 through 3.1.7, and from 4.0.0 through 4.1.4, fast-uri folds the host to lowercase before it percent-decodes the host, so a percent-encoded uppercase octet such as %41 decodes to a literal A that is never folded. For a scheme-relative reference such as //host there is no scheme, so the host canonicalization that would normally repair this does not run, and parse, normalize, and equal then disagree on the same host. An application that makes a case-sensitive host decision on fast-uri output, for example a host allowlist or denylist that compares the parsed host or uses equal, can be steered past the check with a percent-encoded uppercase octet, and because hostnames are case-insensitive in DNS and HTTP the evading spelling still reaches the host the check meant to gate. The issue is fixed in fast-uri 2.4.7, 3.1.8, and 4.1.5, and users should upgrade to one of those versions or later. As a workaround, compare hosts case-insensitively by lowercasing the parsed host before any allowlist or denylist decision.

osv:CVE-2026-86472
Complete source record
{
  "id": "15784e773685c03973ac139bd79254709afe441da9dc98f9826a8a23a8398bbe",
  "url": "https://osv.dev/vulnerability/CVE-2026-86472",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "fast-uri vulnerable to inconsistent host case normalization via percent-encoded octets",
    "summary": "fast-uri is a dependency-free RFC 3986 URI parser for Node.js, used by Fastify and ajv. In versions before 2.4.7, from 3.0.0 through 3.1.7, and from 4.0.0 through 4.1.4, fast-uri folds the host to lowercase before it percent-decodes the host, so a percent-encoded uppercase octet such as %41 decodes to a literal A that is never folded. For a scheme-relative reference such as //host there is no scheme, so the host canonicalization that would normally repair this does not run, and parse, normalize, and equal then disagree on the same host. An application that makes a case-sensitive host decision on fast-uri output, for example a host allowlist or denylist that compares the parsed host or uses equal, can be steered past the check with a percent-encoded uppercase octet, and because hostnames are case-insensitive in DNS and HTTP the evading spelling still reaches the host the check meant to gate. The issue is fixed in fast-uri 2.4.7, 3.1.8, and 4.1.5, and users should upgrade to one of those versions or later. As a workaround, compare hosts case-insensitively by lowercasing the parsed host before any allowlist or denylist decision.",
    "evidence": "osv:CVE-2026-86472",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-86472",
      "aliases": [
        "CVE-2026-86472",
        "GHSA-hrr3-gc8f-f4qj"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/fastify/fast-uri",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "871c6508e171f5577603246f87d54ba5c799e1a0"
                },
                {
                  "introduced": "5964558737eab37fffed66987be5b6a4d550f528"
                },
                {
                  "fixed": "ead3ab7bb134c989e972c8174632d0670023f269"
                },
                {
                  "introduced": "2a5232ef01d62a2044dbd643f7c32f02e30b4fb0"
                },
                {
                  "fixed": "a071da6a7a0c29e630b3590895a12ed22ac1c096"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.4.7"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "introduced": "3.0.0"
                      },
                      {
                        "fixed": "3.1.8"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "introduced": "4.0.0"
                      },
                      {
                        "fixed": "4.1.5"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.4.6",
            "v3.1.7",
            "v4.1.4",
            "v2.4.5",
            "v3.1.6",
            "v4.1.3",
            "v2.4.4",
            "v3.1.5",
            "v4.1.2",
            "v2.4.3",
            "v3.1.4",
            "v4.1.1",
            "v3.1.3",
            "v2.4.2",
            "v4.1.0",
            "v2.4.1",
            "v4.0.1",
            "v3.1.2",
            "v4.0.0",
            "v3.1.1",
            "v3.1.0",
            "v3.0.6",
            "v3.0.5",
            "v3.0.4",
            "v3.0.3",
            "v3.0.2",
            "v3.0.1",
            "v3.0.0",
            "v2.4.0",
            "v2.3.1",
            "v2.3.0",
            "v2.2.0",
            "v2.1.0",
            "v2.0.0",
            "v1.0.1",
            "v1.0.0",
            "v0.0.2",
            "v0.0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-86472.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:32.453505480Z",
      "provider": "osv",
      "references": [
        "https://cna.openjsf.org/security-advisories.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/86xxx/CVE-2026-86472.json",
        "https://github.com/fastify/fast-uri/security/advisories/GHSA-hrr3-gc8f-f4qj",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-86472"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-178"
        ],
        "cna_assigner": "openjs",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/86xxx/CVE-2026-86472.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-86472",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 499586,
  "published_at": "2026-09-15T10:29:50.594+00:00"
}