Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix: GraphQL variable-coercion suggestions disclose schema to unauthenticated callers (GHSA-9g8f-h8f3-hjcm) - #10563

#10563
Merged
mtrezza merged 2 commits into
parse-community:alphaparse-community/parse-server:alphafrom
mtrezza:fix/GHSA-9g8f-h8f3-hjcm-v9mtrezza/parse-server:fix/GHSA-9g8f-h8f3-hjcm-v9Copy head branch name to clipboard
Jul 7, 2026
Merged

fix: GraphQL variable-coercion suggestions disclose schema to unauthenticated callers (GHSA-9g8f-h8f3-hjcm)#10563
mtrezza merged 2 commits into
parse-community:alphaparse-community/parse-server:alphafrom
mtrezza:fix/GHSA-9g8f-h8f3-hjcm-v9mtrezza/parse-server:fix/GHSA-9g8f-h8f3-hjcm-v9Copy head branch name to clipboard

Conversation

@mtrezza

@mtrezza mtrezza commented Jul 7, 2026

Copy link
Copy Markdown
Member

Issue

GraphQL variable-coercion suggestions disclose schema to unauthenticated callers (GHSA-9g8f-h8f3-hjcm)

Tasks

  • Add tests

Summary by CodeRabbit

  • Bug Fixes
    • GraphQL error messages now hide unwanted suggestion text in restricted environments.
    • Sensitive schema or field names are no longer exposed in coercion errors unless elevated access is available.
    • Error formatting now stays consistent across standard and incremental GraphQL responses.
    • Test coverage was expanded to verify suggestion handling and prevent secret leakage in error output.

@parse-github-assistant

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 Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

GraphQL error suggestion stripping now happens at response time for single and incremental responses, including stacktrace entries. The spec suite adds coercion-error cases for missing keys, master key access, and public introspection.

Changes

Schema Suggestion Stripping

Layer / File(s) Summary
Response-time suggestion stripping
src/GraphQL/ParseGraphQLServer.js
SchemaSuggestionsControlPlugin now uses willSendResponse and stripSchemaSuggestion to remove "Did you mean" text from error messages and stacktraces in single and incremental responses.
Coercion error sanitization tests
spec/ParseGraphQLServer.spec.js
Adds getReturnedError plus tests for misspelled Cloud Code function and input field coercion errors, covering sanitization without keys and retention with master key or public introspection.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • parse-community/parse-server#10467: Also updates SchemaSuggestionsControlPlugin in src/GraphQL/ParseGraphQLServer.js and extends spec/ParseGraphQLServer.spec.js for "Did you mean" handling under different access conditions.

Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Description check ❌ Error The description is missing the required Approach section and the standard Pull Request section from the template. Add the missing Pull Request and Approach sections, and expand Tasks to match the template checklist or mark non-applicable items.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the required fix: prefix and accurately describes the GraphQL security fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 PASS: The changed code only strips GraphQL hint text from non-master/non-introspection responses; I found no new auth bypass, injection, or unsafe deserialization pattern.
Engage In Review Feedback ✅ Passed PASS: CodeRabbit flagged the leak assertion, and the author answered by pushing fc2c4ce to make it quote-agnostic; the bot then approved the changes.
✨ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@spec/ParseGraphQLServer.spec.js`:
- Around line 1179-1180: The stacktrace leak assertion in the ParseGraphQLServer
spec is too specific because JSON.stringify escapes quotes, so it can miss a
leaked Did you mean "username"? message. Update the existing error checks in the
ParseGraphQLServer.spec.js expectation block to assert against username directly
rather than the quoted string, matching the style used in the cloud-function
tests and keeping the check in terms of error.message and JSON.stringify(error).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7f79fc3a-f22e-44f1-9479-d11f5deb44d9

📥 Commits

Reviewing files that changed from the base of the PR and between 7e9d53a and 989416c.

📒 Files selected for processing (2)
  • spec/ParseGraphQLServer.spec.js
  • src/GraphQL/ParseGraphQLServer.js

Comment thread spec/ParseGraphQLServer.spec.js Outdated
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.67%. Comparing base (459786f) to head (fc2c4ce).
⚠️ Report is 1 commits behind head on alpha.

Additional details and impacted files
@@           Coverage Diff           @@
##            alpha   #10563   +/-   ##
=======================================
  Coverage   92.66%   92.67%           
=======================================
  Files         193      193           
  Lines       16981    16986    +5     
  Branches      248      248           
=======================================
+ Hits        15736    15741    +5     
  Misses       1224     1224           
  Partials       21       21           

☔ View full report in Codecov by Harness.
📢 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-9g8f-h8f3-hjcm fix: GraphQL variable-coercion suggestions disclose schema to unauthenticated callers (GHSA-9g8f-h8f3-hjcm) Jul 7, 2026
@mtrezza
mtrezza force-pushed the fix/GHSA-9g8f-h8f3-hjcm-v9 branch from 9045657 to fc2c4ce Compare July 7, 2026 21:33
@mtrezza
mtrezza merged commit 2625489 into parse-community:alpha Jul 7, 2026
24 checks passed
@mtrezza
mtrezza deleted the fix/GHSA-9g8f-h8f3-hjcm-v9 branch July 7, 2026 21:51
parseplatformorg pushed a commit that referenced this pull request Jul 7, 2026
# [9.10.0-alpha.4](9.10.0-alpha.3...9.10.0-alpha.4) (2026-07-07)

### Bug Fixes

* GraphQL variable-coercion suggestions disclose schema to unauthenticated callers ([GHSA-9g8f-h8f3-hjcm](GHSA-9g8f-h8f3-hjcm)) ([#10563](#10563)) ([2625489](2625489))
@parseplatformorg

Copy link
Copy Markdown
Contributor

🎉 This change has been released in version 9.10.0-alpha.4

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Jul 7, 2026
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
beiguancyc pushed a commit to beiguancyc/parse-server that referenced this pull request Jul 13, 2026
* commit 'b5ca12fa5e2c951e0cd4ac45ec11e23430da323b': (48 commits)
  chore(release): 9.10.0 [skip ci]
  empty commit to trigger CI
  chore(release): 9.10.0-alpha.8 [skip ci]
  fix: GeoPoint distance queries fail with an internal server error on MongoDB 8.3 and later (parse-community#10572)
  chore(release): 9.10.0-alpha.7 [skip ci]
  fix: Cloud Code beforeFind trigger context is not isolated from prototype pollution (parse-community#10570)
  chore(release): 9.10.0-alpha.6 [skip ci]
  fix: GraphQL error messages disclose pointer and relation target class names when public introspection is disabled ([GHSA-r2g6-4f6j-f6rf](GHSA-r2g6-4f6j-f6rf)) (parse-community#10568)
  chore(release): 9.10.0-alpha.5 [skip ci]
  fix: GraphQL error messages disclose required input field names when public introspection is disabled ([GHSA-2fgh-8j2g-w354](GHSA-2fgh-8j2g-w354)) (parse-community#10566)
  chore(release): 9.10.0-alpha.4 [skip ci]
  fix: GraphQL variable-coercion suggestions disclose schema to unauthenticated callers ([GHSA-9g8f-h8f3-hjcm](GHSA-9g8f-h8f3-hjcm)) (parse-community#10563)
  chore(release): 9.10.0-alpha.3 [skip ci]
  fix: NumberOrBoolean config option (cluster) value not coerced from env/CLI (parse-community#10531)
  chore(release): 9.10.0-alpha.2 [skip ci]
  fix: Stored XSS via malformed Content-Type bypassing file upload extension blocklist ([GHSA-r899-h629-j84r](GHSA-r899-h629-j84r)) (parse-community#10521)
  test: Rate limit requestMethods is scoped to the configured HTTP methods (parse-community#10520)
  chore(release): 9.10.0-alpha.1 [skip ci]
  feat: Add option to disallow aggregation pipelines for the read-only master key (parse-community#10517)
  chore(release): 9.9.1-alpha.13 [skip ci]
  ...

# Conflicts:
#	package.json
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.