/

CVE-2026-49473

Severity:

HIGH RISK

(8.8)

Authorization Bypass (CWE-863) in Express.js Middleware

CVE-2026-49473

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-436, CWE-863

Impact:

Improper Authorization and Access Control Bypass

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A request-matching inconsistency in the Cedar authorization middleware for Express.js can cause Cedar to authorize a different action from the route that Express ultimately executes. Under certain overlapping route configurations, an attacker may append a query string to obtain access to an endpoint protected by a more restrictive policy.

Affected context

The issue can occur in Express applications using affected versions of the Cedar authorization middleware when:

  • Authorization mappings contain overlapping path prefixes
  • Different matching paths have different permission requirements
  • The middleware uses a URL representation that includes the query string
  • Express routes the request using only the path component

This mismatch can cause the authorization decision and executed handler to refer to different logical endpoints.

Exploit preconditions

  • Attack surface: HTTP request handling through an Express.js application
  • Required access: An ability to send requests to an exposed application endpoint; authentication requirements depend on the application's policies
  • Trigger point: Authorization middleware path matching before Express route dispatch
  • Why exploitation is possible: The middleware and Express interpret the request URL differently, allowing a less restrictive Cedar action mapping to authorize a request that Express handles as a more restrictive route

Why this happens

The underlying bug is an inconsistent interpretation of request targets between the authorization layer and the web framework.

The middleware matches Cedar actions using req.originalUrl, which includes the query string, while Express route matching uses the path component. With overlapping path patterns, these representations can resolve to different actions and handlers.

This maps primarily to CWE-863: Incorrect Authorization, with characteristics of CWE-436: Interpretation Conflict, because security-relevant components apply different interpretations to the same request.

Potential impact

  • An attacker may bypass a more restrictive authorization policy
  • Unauthorized users could access protected resources or operations
  • Sensitive user or application data may be disclosed
  • Application integrity could be affected if protected state-changing routes are exposed
  • Authorization policy enforcement may become inconsistent across endpoints

General mitigation guidance

Mitigation generally focuses on ensuring that authorization and routing use the same canonical request representation.

Common defensive patterns include:

  • Matching authorization policies against the normalized path component used by Express routing
  • Canonicalizing and validating request paths before authorization decisions are made
  • Avoiding ambiguous overlapping route mappings with different permission levels
  • Applying endpoint-level authorization checks in handlers or trusted route boundaries
  • Treating the middleware as one layer of defense rather than the sole authorization control
  • Enforcing least-privilege policies for each distinct resource and operation
  • Preserving query parameters as data rather than allowing them to influence route identity

How teams detect issues like this

Organizations can identify this class of issue through:

  • Static analysis and code review checks for authorization decisions based on raw URLs
  • Review of differences between middleware matching logic and framework route matching behavior
  • Tests covering query-string variations, trailing delimiters, encoded characters, and overlapping route prefixes
  • Policy-to-route consistency checks that verify each executed handler is governed by the intended Cedar action
  • Integration tests confirming that authorization decisions remain unchanged when irrelevant query parameters are added
  • Automated security review tools that flag inconsistent URL canonicalization and authorization boundaries

Sources

SourceLink
github.comgithub.com/cedar-policy/authorization-for-expressjs/releases/tag/v0.3.0
github.comgithub.com/cedar-policy/authorization-for-expressjs/security/advisories/GHSA-g4w6-vmgf-xqvx

Frequently asked

questions

Yes. It can be triggered through HTTP requests when the affected middleware protects an exposed Express.js application and the required route configuration is present.

Not necessarily. The required access depends on the application's Cedar policies and route exposure. An authenticated lower-privilege user may be able to reach an endpoint intended for a more privileged role.

Ensure that authorization and Express routing operate on the same canonical path representation, and avoid relying on ambiguous overlapping mappings. Independent endpoint-level authorization provides an additional defense.

Test authorization against normalized paths and varied query strings, review middleware-to-router assumptions, minimize overlapping route patterns, and enforce least-privilege policies at the handler or resource boundary.

Find out what's already
exploitable in your codebase.