Flowise - Mass Assignment in PUT /api/v1/user Allows Password Hash Override
Description
Flowise before 3.1.2 contains a mass assignment vulnerability in the PUT /api/v1/user endpoint that allows authenticated users to directly modify the credential field without validation. Attackers can bypass password change verification and session invalidation by supplying a crafted password hash, establishing persistent account access after temporary session compromise.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
2Patches
Vulnerability mechanics
Root cause
"Missing field allowlist in the PUT /api/v1/user endpoint allows authenticated users to directly overwrite the credential (password hash) field without validation."
Attack vector
An authenticated attacker sends a `PUT /api/v1/user` request with a crafted JSON body containing their user ID and a pre-computed bcrypt hash in the `credential` field. Because the endpoint does not filter incoming fields, the supplied hash overwrites the stored password hash without requiring the old password, bypassing password change verification, hashing enforcement, policy validation, and session invalidation [ref_id=1]. This allows an attacker who has temporarily obtained a victim's session (e.g., via XSS or token theft) to permanently take over the account [ref_id=1].
Affected code
The vulnerability resides in the `PUT /api/v1/user` endpoint. The controller forwards the entire request body to `userService.updateUser(req.body)` without filtering, and `UserService.updateUser` merges all fields into the existing user entity via `queryRunner.manager.merge(User, oldUserData, newUserData)`. No field allowlist is applied, so sensitive fields such as `credential`, `tempToken`, `tokenExpiry`, `status`, and `email` can be directly overwritten [ref_id=1].
What the fix does
The advisory does not provide a patch diff, but the recommended fix is to implement a field allowlist in the `PUT /api/v1/user` endpoint so that only permitted fields (e.g., name, email) are accepted from the request body, and to enforce the secure password change workflow (requiring `oldPassword`, `newPassword`, and `confirmPassword`) for any credential update [ref_id=1]. Without such filtering, the `merge` operation blindly applies all user-supplied fields, including the `credential` hash.
Preconditions
- authAttacker must have a valid JWT token for an authenticated session
- inputAttacker must know the target user's ID (which is returned upon login)
- networkAttacker must be able to send a PUT request to /api/v1/user
Generated on Jun 21, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
2- github.com/FlowiseAI/Flowise/security/advisories/GHSA-59fh-9f3p-7m39mitrevendor-advisory
- www.vulncheck.com/advisories/flowise-mass-assignment-in-put-api-v1-user-allows-password-hash-overridemitrethird-party-advisory
News mentions
0No linked articles in our index yet.