Vulnerability Information
Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.
Vulnerability Title
@cedar-policy/authorization-for-expressjs has an authorization bypass via query string manipulation
Vulnerability 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.
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Vulnerability Type
解释冲突
Vulnerability Title
Cedar authorization-for-expressjs 处理逻辑错误漏洞
Vulnerability Description
Cedar authorization-for-expressjs是Cedar组织的一款基于策略的授权中间件。 Cedar authorization-for-expressjs 0.3.0之前版本存在安全漏洞,该漏洞源于中间件使用包含查询字符串的req.originalUrl匹配请求与Cedar操作映射,而Express仅使用路径进行路由,导致授权与执行不一致,攻击者可通过附加查询字符串绕过更严格的授权策略,可能导致越权访问。
CVSS Information
N/A
Vulnerability Type
N/A