Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @fastify/middie
  4. ›
  5. CVE-2026-22031

CVE-2026-22031: Fastify Middie Middleware Path Bypass

January 20, 2026

A security vulnerability exists in @fastify/middie 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.

References

  • github.com/advisories/GHSA-cxrg-g7r8-w69p
  • github.com/fastify/middie
  • github.com/fastify/middie/commit/d44cd56eb724490babf7b452fdbbdd37ea2effba
  • github.com/fastify/middie/pull/245
  • github.com/fastify/middie/releases/tag/v9.1.0
  • github.com/fastify/middie/security/advisories/GHSA-cxrg-g7r8-w69p
  • nvd.nist.gov/vuln/detail/CVE-2026-22031

Code Behaviors & Features

Detect and mitigate CVE-2026-22031 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 9.1.0

Fixed versions

  • 9.1.0

Solution

Upgrade to version 9.1.0 or above.

Impact 8.4 HIGH

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L

Learn more about CVSS

Weakness

  • CWE-177: Improper Handling of URL Encoding (Hex Encoding)

Source file

npm/@fastify/middie/CVE-2026-22031.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 04 Feb 2026 00:35:33 +0000.