fix: Endpoints /login and /verifyPassword disclose MFA secrets and protected fields when _User get is denied (GHSA-75v4-m273-5j49)#10492
Conversation
|
🚀 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
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. |
📝 WalkthroughWalkthroughThis PR prevents post-auth ChangesAuth Flow CLP-Aware User Re-fetch
Sequence Diagram(s)sequenceDiagram
participant Client
participant UsersRouter as handleLogIn/handleVerifyPassword
participant RestAPI as rest.get
participant Sanitizer as removeHiddenProperties
participant DB as Database
participant Response
Client->>UsersRouter: POST /login or POST /verifyPassword
UsersRouter->>RestAPI: refetch _User with caller context
RestAPI-->>UsersRouter: returns sanitized user OR throws/returns empty (CLP denied)
alt re-fetch denied for non-master
UsersRouter->>UsersRouter: set filteredUser = { objectId }
else re-fetch allowed or master
UsersRouter->>UsersRouter: use refetched filtered user
end
UsersRouter->>Sanitizer: remove hidden properties, attach session token, sanitize authData/MFA
Sanitizer->>Response: send final response to Client
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha #10492 +/- ##
==========================================
+ Coverage 92.59% 92.60% +0.01%
==========================================
Files 193 193
Lines 16897 16897
Branches 234 234
==========================================
+ Hits 15645 15648 +3
+ Misses 1229 1226 -3
Partials 23 23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
/login and /verifyPassword disclose MFA secrets and protected fields when _User get is denied (GHSA-75v4-m273-5j49)
## [9.9.1-alpha.5](9.9.1-alpha.4...9.9.1-alpha.5) (2026-06-03) ### Bug Fixes * Endpoints `/login` and `/verifyPassword` disclose MFA secrets and protected fields when `_User` get is denied ([GHSA-75v4-m273-5j49](https://github.com/parse-community/parse-server/security/advisories/GHSA-75v4-m273-5j49)) ([#10492](#10492)) ([83e90ed](83e90ed))
|
🎉 This change has been released in version 9.9.1-alpha.5 |
Issue
Endpoints
/loginand/verifyPassworddisclose MFA secrets and protected fields when_Userget is denied (GHSA-75v4-m273-5j49)Tasks