@fastify/middie vulnerable to authorization bypass via encoded slash in path parameter values
@fastify/middie versions 9.1.0 through 9.3.2 decode the encoded slash %2F inside path parameter values before matching middleware paths, while Fastify's underlying router preserves the encoding during route lookup. The two layers disagree on the canonical request path, so the middleware fails to match a URL that the route handler does match. When middleware is used for authentication, authorization, rate limiting, or auditing on parameterized paths, an attacker can reach the protected handler by sending a single crafted URL with an encoded slash in the parameter position. The bypass is HTTP method agnostic and requires no authentication or special preconditions. Patches: upgrade to @fastify/middie 9.3.3. Workarounds: avoid parameterized middleware paths for security decisions, or enforce authentication at the route handler or via a Fastify hook that runs after the router has resolved the request.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-14198
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 06:01 UTC · Revision 1
Source evidence
@fastify/middie vulnerable to authorization bypass via encoded slash in path parameter values
core-osv · Original sourcePublished 1 Jul 2026, 11:29 UTC
@fastify/middie versions 9.1.0 through 9.3.2 decode the encoded slash %2F inside path parameter values before matching middleware paths, while Fastify's underlying router preserves the encoding during route lookup. The two layers disagree on the canonical request path, so the middleware fails to match a URL that the route handler does match. When middleware is used for authentication, authorization, rate limiting, or auditing on parameterized paths, an attacker can reach the protected handler by sending a single crafted URL with an encoded slash in the parameter position. The bypass is HTTP method agnostic and requires no authentication or special preconditions. Patches: upgrade to @fastify/middie 9.3.3. Workarounds: avoid parameterized middleware paths for security decisions, or enforce authentication at the route handler or via a Fastify hook that runs after the router has resolved the request.
osv:CVE-2026-14198
Complete source record
{
"id": "7e64537674bae0ce74b1512bfb3f66028f8681c85d77159a059f29bbcd6bfdf8",
"url": "https://osv.dev/vulnerability/CVE-2026-14198",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "@fastify/middie vulnerable to authorization bypass via encoded slash in path parameter values",
"summary": "@fastify/middie versions 9.1.0 through 9.3.2 decode the encoded slash %2F inside path parameter values before matching middleware paths, while Fastify's underlying router preserves the encoding during route lookup. The two layers disagree on the canonical request path, so the middleware fails to match a URL that the route handler does match. When middleware is used for authentication, authorization, rate limiting, or auditing on parameterized paths, an attacker can reach the protected handler by sending a single crafted URL with an encoded slash in the parameter position. The bypass is HTTP method agnostic and requires no authentication or special preconditions. Patches: upgrade to @fastify/middie 9.3.3. Workarounds: avoid parameterized middleware paths for security decisions, or enforce authentication at the route handler or via a Fastify hook that runs after the router has resolved the request.",
"evidence": "osv:CVE-2026-14198",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2026-14198",
"aliases": [
"CVE-2026-14198",
"GHSA-2v46-jxjm-7q3v"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/fastify/middie",
"type": "GIT",
"events": [
{
"introduced": "8de54e35035cefa5ca13fd9f06c7b38185038a0e"
},
{
"fixed": "e038188b33b9436e1be9f9d1c1920416ec6c18f1"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "9.1.0"
},
{
"fixed": "9.3.3"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
},
{
"cpe": "cpe:2.3:a:fastify:fastify\\/middie:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "9.1.0"
},
{
"fixed": "9.3.3"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v9.3.2",
"v9.3.1",
"v9.3.0",
"v9.2.0",
"v9.1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-14198.json"
}
}
],
"modified": "2026-10-28T02:30:26.455567106Z",
"provider": "osv",
"references": [
"https://cna.openjsf.org/security-advisories.html",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/14xxx/CVE-2026-14198.json",
"https://github.com/fastify/middie/security/advisories/GHSA-2v46-jxjm-7q3v",
"https://nvd.nist.gov/vuln/detail/CVE-2026-14198"
],
"provider_metadata": {
"cwe_ids": [
"CWE-436"
],
"cna_assigner": "openjs",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/14xxx/CVE-2026-14198.json"
}
},
"related_cves": [
{
"value": "CVE-2026-14198",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 492905,
"published_at": "2026-07-01T11:29:20.435+00:00"
}