LiveActive security incident?Get immediate response
CVE Record

CVE-2026-22037: @fastify/express vulnerable to Improper Handling of URL Encoding (Hex Encoding)

The @fastify/express plugin adds full Express compatibility to Fastify. A security vulnerability exists in @fastify/express prior to version 4.0.3 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. The vulnerability is caused by how @fastify/express matches requests against registered middleware paths. This vulnerability is similar to, but differs from, CVE-2026-22031 because this is a different npm module with its own code. Version 4.0.3 of @fastify/express contains a patch fort the issue.

HighCVSS 8.4Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

CVE-2026-22037 affects Node.js applications using @fastify/express before 4.0.3. Certain protected routes can be reached without the intended middleware checks when URL-encoded characters alter path matching. This can bypass access controls or other middleware protections, depending on how the application uses path-prefixed middleware.

Executive priority

Treat as high priority for internet-facing or sensitive applications using @fastify/express. The business risk is unauthorized access to protected application functions if middleware-based controls are bypassed. Prioritize upgrade and exposure review, especially where admin or sensitive API routes rely on middleware prefixes.

Technical view

@fastify/express mishandles URL hex encoding when matching middleware registered on a path prefix. The middleware layer may not match an encoded request path, while Fastify’s router decodes and still routes to the handler. Affected versions are @fastify/express before 4.0.3. The issue is classified under CWE-177 and CWE-288 with CVSS 8.4.

Likely exposure

Exposure is limited to applications using @fastify/express versions below 4.0.3 and relying on path-prefixed middleware for authentication, authorization, filtering, logging, or other controls. Applications not using this plugin, or not depending on prefix middleware for protection, are less likely to be affected.

Exploitation context

The CVE record does not indicate known active exploitation, and it is not listed as KEV in the provided data. Exploitation requires a route/middleware design where protected handlers remain reachable even when prefix middleware is skipped. The CVSS vector indicates network access, low privileges, no user interaction, and high confidentiality and integrity impact.

Researcher notes

This issue is similar in theme to CVE-2026-22031 but affects a distinct npm module and codebase. The provided sources name 4.0.3 as patched and reference a fixing commit. Evidence is sufficient for affected version and root cause, but no public exploitation status is provided in the bundle.

Mitigation direction

  • Upgrade @fastify/express to version 4.0.3 or later.
  • Review package-lock, yarn.lock, pnpm-lock, and SBOM data for vulnerable versions.
  • Identify routes protected primarily by path-prefixed middleware.
  • Check the GitHub advisory for any updated vendor guidance.

Validation and detection

  • Confirm deployed applications do not include @fastify/express below 4.0.3.
  • Review middleware registrations that use path prefixes for security controls.
  • Verify protected routes enforce authorization within handlers or reliably executed middleware.
  • Run controlled regression tests for encoded path handling after upgrading.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-177: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cwe · low confidence lookup

CWE-288: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-22037 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.4 (3.1)
Known Exploited
No
Published

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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.4CVSS 3.1HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L1.86Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

8.4High
CVSS 3.1 vector shape for CVE-2026-22037Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
fastifyfastify-express< 4.0.3Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-177 · source CWE mapping

Improper Handling of URL Encoding (Hex Encoding)

Improper Handling of URL Encoding (Hex Encoding) represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.

CWE-288 · source CWE mapping

Authentication Bypass Using an Alternate Path or Channel

Authentication Bypass Using an Alternate Path or Channel represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.