{"schemaVersion":3,"id":"CVE-2026-22031","aliases":["GHSA-cxrg-g7r8-w69p"],"status":"published","duplicateOf":null,"title":null,"description":"@fastify/middie is the plugin that adds middleware support on steroids to Fastify. A security vulnerability exists in @fastify/middie prior to version 9.1.0 where middleware registered with a specific path prefix can be bypassed using URL-encoded characters (e.g., `/%61dmin` instead of `/admin`). While the middleware engine fails to match the encoded path and skips execution, the underlying Fastify router correctly decodes the path and matches the route handler, allowing attackers to access protected endpoints without the middleware constraints. Version 9.1.0 fixes the issue.","dates":{"published":"2026-01-19T15:24:45.899Z","modified":"2026-01-20T14:45:31.487Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":8.8,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":8.4,"severity":"high","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Npm","score":8.4,"severity":"high","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L","exploitability":4.6,"impact":10,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":8.8,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00532,"percentile":0.43855,"severity":"low","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0.006999999999999975,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.00525},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00476,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00476,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00532,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00532,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00532,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00532,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00532,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00532,"percentile":0.43855}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00525,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00532,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00532,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00532,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00532,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00532,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00532,"percentile":0.43855}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"GITHUB_FASTIFY_MIDDIE","name":"Middie","source":"github","url":"https://github.com/fastify/middie/security/advisories/GHSA-cxrg-g7r8-w69p","maturity":"poc","reliabilityScore":0.3,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-177","name":"Improper Handling of URL Encoding (Hex Encoding)","description":"The product does not properly handle when all or part of an input has been URL encoded.","type":"weakness","status":"Draft","abstraction":"Variant","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/177.html"}],"affected":[{"vendor":"fastify","product":"fastify\\/middie","name":"fastify\\/middie","label":"fastify\\/middie","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 9.1.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 9.1.0","eol":null,"hubHref":"/vendor/fastify/fastifymiddie"},{"vendor":"fastify","product":"middie","name":"middie","label":"middie","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 9.1.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 9.1.0","eol":null,"hubHref":"/vendor/fastify/middie"},{"vendor":"@fastify","product":"middie","name":"@fastify/middie","label":"middie","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/@fastify/middie","purlType":"npm","versions":[{"text":"< 9.1.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 9.1.0","eol":null,"hubHref":null}],"affectedCount":3,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/fastify/middie/security/advisories/GHSA-cxrg-g7r8-w69p","label":"github.com/fastify/middie/security/advisories/GHSA-cxrg-g7r8-w69p","hostname":"github.com","tags":["X Refsource CONFIRM","WEB","Exploit","Vendor Advisory"]},{"url":"https://github.com/fastify/middie/pull/245","label":"github.com/fastify/middie/pull/245","hostname":"github.com","tags":["X Refsource MISC","WEB","Issue Tracking","Patch"]},{"url":"https://github.com/fastify/middie/commit/d44cd56eb724490babf7b452fdbbdd37ea2effba","label":"github.com/fastify/middie/commit/d44cd56eb724490babf7b452fdbbdd37ea2effba","hostname":"github.com","tags":["X Refsource MISC","WEB","Patch"]},{"url":"https://github.com/fastify/middie/releases/tag/v9.1.0","label":"github.com/fastify/middie/releases/tag/v9.1.0","hostname":"github.com","tags":["X Refsource MISC","WEB","Product","Release Notes"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22031","label":"nvd.nist.gov/vuln/detail/CVE-2026-22031","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/fastify/middie","label":"github.com/fastify/middie","hostname":"github.com","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":["CVE-2026-6414"]},"timeline":[{"kind":"published","date":"2026-01-19T15:24:45.899Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-01-20T14:45:31.487Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":45,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T19:15:55.144Z","stale":false,"partial":false}}