Description
@cedar-policy/authorization-for-expressjs is an open-source Express.js middleware that integrates Cedar authorization into Express applications by mapping HTTP requests to Cedar actions and evaluating authorization policies before allowing requests to proceed. Versions prior to 0.3.0 have an issue where, under certain circumstances, the middleware matches incoming requests against Cedar action mappings using req.originalUrl, which includes the query string, while Express routes requests using only the path component. The middleware uses req.originalUrl to match incoming requests against Cedar action mappings. In Express, req.originalUrl includes the query string, while route matching uses only the path. This creates a divergence between what Cedar authorizes and what Express executes. When an application defines separate actions for overlapping path prefixes with different authorization requirements (for example, GET /users for listing all users with admin-only access, and GET /users/{id} for retrieving a single user with any authenticated user access), an actor can append a query string to bypass the more restrictive policy. Sending GET /users/?x=1 causes the middleware to match against /users/{id} (with id parameter set to ?x=1) and evaluate the less restrictive action, while Express routes the request to the /users list handler. This allows inappropriate access to the more restrictive endpoint. This issue has been addressed in version 0.30. Some workarounds are available. Validate and sanitize incoming request paths before they reach the authorization middleware. Ensure that applications do not rely solely on the middleware for authorization when defining multiple actions on overlapping path prefixes with different permission levels.
Published: 2026-08-12
Score: 8.8 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability resides in the authorization-for-expressjs middleware’s use of req.originalUrl, which includes the query string, when matching to Cedar action mappings. Express route matching, however, ignores the query string. This mismatch allows an attacker to manipulate the query string to force the middleware to evaluate a less restrictive policy while the request is routed to a more restrictive handler, enabling access to endpoints that should be protected. The weakness is a mismatch between request mapping and authorization enforcement, with the potential to expose data or functionality to unauthorized users. The associated CWEs are 436 (Unsound Authorization) and 863 (Mismatch Between Permission and Service Access).

Affected Systems

Any application that incorporates cedar-policy:authorization-for-expressjs version 0.2.x or earlier and defines routes with overlapping path prefixes that have differing authorization requirements – for example, a GET /users route with an admin‑only policy and a GET /users/:id route with a less restrictive policy. Clients of the middleware using Express.js will be affected, regardless of the underlying operating system or deployment environment. The issue exists in all of the middleware’s public releases before 0.3.0; updates starting at 0.3.0 contain a fix.

Risk and Exploitability

With a CVSS score of 8.8 the vulnerability is considered high severity. Although no EPSS value is published, the lack of a KEV listing suggests that zero‑day exploitation is not yet documented, yet the attack surface is widely available through regular HTTP requests. An adversary can execute the exploit remotely by crafting a request that includes a query string, causing the middleware to authorize a lower‑privilege action while the web application processes the request under a stricter policy. The divergence permits unauthorized data access or operation execution. The attack vector is via standard HTTP requests; no local privilege escalation or arbitrary code execution is involved, but the potential for privilege escalation within the web application remains significant.

Generated by OpenCVE AI on August 13, 2026 at 01:45 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update to version 0.3.0 or later of cedar-policy/authorization-for-expressjs
  • Validate and sanitize the request path before it reaches the authorization middleware, stripping the query string or normalizing URLs
  • Design Express routes to avoid overlapping path prefixes that require different authorization levels, or place stricter policies earlier in the routing chain

Generated by OpenCVE AI on August 13, 2026 at 01:45 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-g4w6-vmgf-xqvx @cedar-policy/authorization-for-expressjs has an authorization bypass via query string manipulation
History

Wed, 12 Aug 2026 23:30:00 +0000

Type Values Removed Values Added
Description @cedar-policy/authorization-for-expressjs is an open-source Express.js middleware that integrates Cedar authorization into Express applications by mapping HTTP requests to Cedar actions and evaluating authorization policies before allowing requests to proceed. Versions prior to 0.3.0 have an issue where, under certain circumstances, the middleware matches incoming requests against Cedar action mappings using req.originalUrl, which includes the query string, while Express routes requests using only the path component. The middleware uses req.originalUrl to match incoming requests against Cedar action mappings. In Express, req.originalUrl includes the query string, while route matching uses only the path. This creates a divergence between what Cedar authorizes and what Express executes. When an application defines separate actions for overlapping path prefixes with different authorization requirements (for example, GET /users for listing all users with admin-only access, and GET /users/{id} for retrieving a single user with any authenticated user access), an actor can append a query string to bypass the more restrictive policy. Sending GET /users/?x=1 causes the middleware to match against /users/{id} (with id parameter set to ?x=1) and evaluate the less restrictive action, while Express routes the request to the /users list handler. This allows inappropriate access to the more restrictive endpoint. This issue has been addressed in version 0.30. Some workarounds are available. Validate and sanitize incoming request paths before they reach the authorization middleware. Ensure that applications do not rely solely on the middleware for authorization when defining multiple actions on overlapping path prefixes with different permission levels.
Title @cedar-policy/authorization-for-expressjs has an authorization bypass via query string manipulation
Weaknesses CWE-436
CWE-863
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-12T23:22:38.727Z

Reserved: 2026-05-30T04:17:43.094Z

Link: CVE-2026-49473

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-13T00:17:32.587

Modified: 2026-08-13T00:17:32.587

Link: CVE-2026-49473

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T02:00:13Z

Weaknesses