Skip to content

fix: Server option routeAllowList is bypassable through batch sub-requests (GHSA-p84r-h6rx-f2xr)#10482

Merged
mtrezza merged 1 commit into
parse-community:alphafrom
mtrezza:fix/GHSA-p84r-h6rx-f2xr-v9
May 27, 2026
Merged

fix: Server option routeAllowList is bypassable through batch sub-requests (GHSA-p84r-h6rx-f2xr)#10482
mtrezza merged 1 commit into
parse-community:alphafrom
mtrezza:fix/GHSA-p84r-h6rx-f2xr-v9

Conversation

@mtrezza

@mtrezza mtrezza commented May 27, 2026

Copy link
Copy Markdown
Member

Issue

Server option routeAllowList is bypassable through batch sub-requests (GHSA-p84r-h6rx-f2xr)

Tasks

  • Add tests

@parse-github-assistant

parse-github-assistant Bot commented May 27, 2026

Copy link
Copy Markdown

🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review.

Tip

  • Keep pull requests small. Large PRs will be rejected. Break complex features into smaller, incremental PRs.
  • Use Test Driven Development. Write failing tests before implementing functionality. Ensure tests pass.
  • Group code into logical blocks. Add a short comment before each block to explain its purpose.
  • We offer conceptual guidance. Coding is up to you. PRs must be merge-ready for human review.
  • Our review focuses on concept, not quality. PRs with code issues will be rejected. Use an AI agent.
  • Human review time is precious. Avoid review ping-pong. Inspect and test your AI-generated code.

Note

Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect.

Caution

Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code.

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR extends route allow-list enforcement from middleware to batch sub-requests by refactoring middleware helpers into reusable decision functions, applying them during batch handling, and adding comprehensive test coverage for sub-request rejection and bypass scenarios.

Changes

Route Allow-List Enforcement for Batch Sub-Requests

Layer / File(s) Summary
Route allow-list normalization and decision logic
src/middlewares.js
normalizeRouteAllowListPath removes mount prefix, trims slashes, and strips query strings. New exported isRouteAllowed centralizes allow-list logic by allowing unset lists, master/maintenance auth, or matching paths against regex. enforceRouteAllowList refactored to use the new helper and shared path normalization in error messages.
Batch sub-request allow-list enforcement
src/batch.js
Imports isRouteAllowed and createSanitizedError. During batch handling, each sub-request's routable path is checked; disallowed paths throw OPERATION_FORBIDDEN with sanitized errors including the HTTP method and path.
Batch sub-request enforcement test suite
spec/RouteAllowList.spec.js
Tests verify rejection of disallowed sub-request paths, success with allowlisted paths, full-batch rejection when any sub-request is disallowed, and master-key bypass of allow-list rules.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is completely empty, missing all required template sections including Issue, Approach, and Tasks checklist. Add a comprehensive pull request description following the template, including the Issue being fixed (GHSA-p84r-h6rx-f2xr details), the Approach taken (route allow-list enforcement in batch requests), and completion status of Tasks.
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Security Check ✅ Passed PR properly fixes routeAllowList bypass in batch endpoint by enforcing per-sub-request checks with secure path normalization, regex matching, error sanitization, and comprehensive test coverage.
Engage In Review Feedback ✅ Passed PR created on 2026-05-27 with single commit; no reviewers assigned and no review comments present to engage with, making the check not yet applicable.
Title check ✅ Passed The title begins with the required 'fix:' prefix and clearly describes the security vulnerability being addressed in the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.60%. Comparing base (0ae0ed3) to head (a1bb037).
⚠️ Report is 1 commits behind head on alpha.

Files with missing lines Patch % Lines
src/middlewares.js 91.30% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            alpha   #10482      +/-   ##
==========================================
+ Coverage   92.58%   92.60%   +0.01%     
==========================================
  Files         193      193              
  Lines       16884    16893       +9     
  Branches      234      234              
==========================================
+ Hits        15632    15643      +11     
+ Misses       1229     1227       -2     
  Partials       23       23              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mtrezza mtrezza changed the title fix: GHSA-p84r-h6rx-f2xr fix: Server option routeAllowList is bypassable through batch sub-requests (GHSA-p84r-h6rx-f2xr) May 27, 2026
@mtrezza mtrezza merged commit 552c6dd into parse-community:alpha May 27, 2026
23 of 24 checks passed
parseplatformorg pushed a commit that referenced this pull request May 27, 2026
## [9.9.1-alpha.3](9.9.1-alpha.2...9.9.1-alpha.3) (2026-05-27)

### Bug Fixes

* Server option routeAllowList is bypassable through batch sub-requests ([GHSA-p84r-h6rx-f2xr](GHSA-p84r-h6rx-f2xr)) ([#10482](#10482)) ([552c6dd](552c6dd))
@parseplatformorg

Copy link
Copy Markdown
Contributor

🎉 This change has been released in version 9.9.1-alpha.3

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label May 27, 2026
@mtrezza mtrezza deleted the fix/GHSA-p84r-h6rx-f2xr-v9 branch May 27, 2026 20:46
parseplatformorg pushed a commit that referenced this pull request Jul 13, 2026
# [9.10.0](9.9.0...9.10.0) (2026-07-13)

### Bug Fixes

* Cloud Code beforeFind trigger context is not isolated from prototype pollution ([#10570](#10570)) ([bea001e](bea001e))
* Cloud Function multipart requests bypass the maxUploadSize limit ([#10498](#10498)) ([f12e1c3](f12e1c3))
* Denial of service via exponential-time processing of deeply nested query operators ([GHSA-cgxm-vr2f-6fj8](GHSA-cgxm-vr2f-6fj8)) ([#10511](#10511)) ([1103c7a](1103c7a))
* Endpoints `/login` and `/verifyPassword` disclose MFA secrets and protected fields when `_User` get is denied ([GHSA-75v4-m273-5j49](GHSA-75v4-m273-5j49)) ([#10492](#10492)) ([83e90ed](83e90ed))
* GeoPoint distance queries fail with an internal server error on MongoDB 8.3 and later ([#10572](#10572)) ([b706c22](b706c22))
* GraphQL "Did you mean" validation suggestions disclose schema to unauthenticated callers ([GHSA-8cph-rgr4-g5vj](GHSA-8cph-rgr4-g5vj)) ([#10467](#10467)) ([155123a](155123a))
* GraphQL error messages disclose pointer and relation target class names when public introspection is disabled ([GHSA-r2g6-4f6j-f6rf](GHSA-r2g6-4f6j-f6rf)) ([#10568](#10568)) ([cb9b542](cb9b542))
* GraphQL error messages disclose required input field names when public introspection is disabled ([GHSA-2fgh-8j2g-w354](GHSA-2fgh-8j2g-w354)) ([#10566](#10566)) ([d96c945](d96c945)), closes [GHSA-2f#8j2g-w354](https://github.com/GHSA-2f/issues/8j2g-w354) [/github.com/parse-community/parse-server/security/advisories/GHSA-2f#8j2g-w354](https://github.com//github.com/parse-community/parse-server/security/advisories/GHSA-2f/issues/8j2g-w354)
* GraphQL variable-coercion suggestions disclose schema to unauthenticated callers ([GHSA-9g8f-h8f3-hjcm](GHSA-9g8f-h8f3-hjcm)) ([#10563](#10563)) ([2625489](2625489))
* LiveQuery discloses object data to a subscriber across an ACL read-access change ([GHSA-97pr-9hgg-3p8r](GHSA-97pr-9hgg-3p8r)) ([#10515](#10515)) ([e9c85df](e9c85df))
* LiveQuery subscriptions leak when a client reuses a subscribe requestId ([#10499](#10499)) ([3fad4fb](3fad4fb))
* Middleware route checks do not match routing-equivalent path variants (trailing slash, case) ([#10501](#10501)) ([f861210](f861210))
* NumberOrBoolean config option (cluster) value not coerced from env/CLI ([#10531](#10531)) ([459786f](459786f))
* Pre-authentication denial of service via client version header regex backtracking ([GHSA-38m6-82c8-4xfm](GHSA-38m6-82c8-4xfm)) ([#10463](#10463)) ([56c159e](56c159e))
* rateLimit on exact static routes is bypassed by appending a query string ([#10500](#10500)) ([880e8e6](880e8e6))
* Relation `$relatedTo` query bypasses `protectedFields` and owning-object ACL ([GHSA-wmwx-jr2p-4j4r](GHSA-wmwx-jr2p-4j4r)) ([#10493](#10493)) ([43658f1](43658f1))
* Server option routeAllowList is bypassable through batch sub-requests ([GHSA-p84r-h6rx-f2xr](GHSA-p84r-h6rx-f2xr)) ([#10482](#10482)) ([552c6dd](552c6dd))
* Stored XSS via malformed Content-Type bypassing file upload extension blocklist ([GHSA-r899-h629-j84r](GHSA-r899-h629-j84r)) ([#10521](#10521)) ([cce91e5](cce91e5))
* Stored XSS via non-standard file extension bypassing file upload extension blocklist ([GHSA-v8x7-r927-cc93](GHSA-v8x7-r927-cc93)) ([#10505](#10505)) ([be12a60](be12a60))
* Stored XSS via trailing-dot filename bypassing file upload extension blocklist ([GHSA-7wqv-xjf3-x35v](GHSA-7wqv-xjf3-x35v)) ([#10489](#10489)) ([66484ce](66484ce))

### Features

* Add option to disallow aggregation pipelines for the read-only master key ([#10517](#10517)) ([816078f](816078f))
@parseplatformorg

Copy link
Copy Markdown
Contributor

🎉 This change has been released in version 9.10.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released Released as stable version state:released-alpha Released as alpha version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants