Skip to content

fix: Relation $relatedTo query using an operator instead of an object ID bypasses owning-object ACL (GHSA-58m4-cqvw-4vgh) - #10784

Merged
mtrezza merged 1 commit into
parse-community:release-8.x.xfrom
mtrezza:fix/GHSA-58m4-cqvw-4vgh-8
Oct 11, 2026
Merged

mtrezza merged 1 commit into
parse-community:release-8.x.xfrom
mtrezza:fix/GHSA-58m4-cqvw-4vgh-8

Conversation

@mtrezza

@mtrezza mtrezza commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Issue

Relation $relatedTo query using an operator instead of an object ID bypasses owning-object ACL (GHSA-58m4-cqvw-4vgh)

Tasks

  • Add tests
  • Add changes to documentation (guides, repository pages, code comments)
  • Add security check
  • Add new Parse Error codes to Parse JS SDK

@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 Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 0ccf4d6b-ce24-4850-a0cc-9ffd55192cbd


📥 Commits

Reviewing files that changed from the base of the PR and between 70329da and 856c0e6.



📒 Files selected for processing (2)
  • spec/vulnerabilities.spec.js
  • src/Controllers/DatabaseController.js


Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.




📝 Walkthrough
📝 Walkthrough

Walkthrough

The controller now rejects malformed $relatedTo constraints before authorization. New vulnerability tests cover operator-valued and non-string fields, result and count behavior, and a valid relation query.

Changes

$relatedTo constraint validation

Layer / File(s) Summary
Validate constraints and verify query behavior
src/Controllers/DatabaseController.js, spec/vulnerabilities.spec.js
reduceRelationKeys checks that the owner object exists and that its className and objectId, and the relation key, are strings. Tests cover invalid constraints, result and count behavior, master-key requests, and a valid pointer.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~12 minutes



Merge Risk: ⚪ Minimal · up to 856c0

No concrete issue remains that would prevent merging after normal checks.


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 pull request has no description. It does not provide the required issue, approach, or task details. Add a description that includes the Issue, Approach, and Tasks sections. Mark the completed security check and test tasks, and state whether documentation changes or Parse JS SDK error-code changes apply.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check Passed The title uses the required fix: prefix and identifies the security issue addressed by the changes.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
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 The change does not introduce a security vulnerability. reduceRelationKeys now rejects $relatedTo values unless object.className, object.objectId, and key are strings before authorization or…
Engage In Review Feedback Passed The review contains zero actionable findings and no CodeRabbit review threads. Therefore, there was no review feedback requiring engagement, implementation, or discussion.


  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR



  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@mtrezza

mtrezza commented Oct 11, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@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.

Pre-merge checks failed. Please resolve the failing checks before merging.

@codecov

codecov Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.28%. Comparing base (7433e30) to head (856c0e6).
⚠️ Report is 1 commits behind head on release-8.x.x.

Additional details and impacted files
@@                Coverage Diff                @@
##           release-8.x.x   #10784      +/-   ##
=================================================
- Coverage          92.68%   92.28%   -0.41%     
=================================================
  Files                192      192              
  Lines              16339    16342       +3     
  Branches             238      238              
=================================================
- Hits               15144    15081      -63     
- Misses              1174     1236      +62     
- Partials              21       25       +4     

☔ 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-58m4-cqvw-4vgh fix: Relation $relatedTo query using an operator instead of an object ID bypasses owning-object ACL (GHSA-58m4-cqvw-4vgh) Oct 11, 2026
@mtrezza
mtrezza merged commit 12af4d6 into parse-community:release-8.x.x Oct 11, 2026
40 of 49 checks passed
@mtrezza
mtrezza deleted the fix/GHSA-58m4-cqvw-4vgh-8 branch October 11, 2026 21:46
parseplatformorg pushed a commit that referenced this pull request Oct 11, 2026
## [8.6.105](8.6.104...8.6.105) (2026-10-11)

### Bug Fixes

* Relation `$relatedTo` query using an operator instead of an object ID bypasses owning-object ACL ([GHSA-58m4-cqvw-4vgh](GHSA-58m4-cqvw-4vgh)) ([#10784](#10784)) ([12af4d6](12af4d6))
@parseplatformorg

Copy link
Copy Markdown
Contributor

🎉 This change has been released in version 8.6.105

@parseplatformorg parseplatformorg added the state:released-8.x.x Released as LTS version label Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released-8.x.x Released as LTS version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants