Summary
vhr does not verify that the account identifier in a password-change request belongs to the authenticated user. An authenticated attacker who knows a target account's current password may change that account's password by supplying its identifier, potentially enabling account takeover.
Affected context
The issue occurs in vhr's PUT /hr/pass password-change endpoint when the request accepts an account ID and current password from the client. Deployments are at risk when authorization checks confirm authentication but do not also verify that the referenced account is owned by, or otherwise authorized for, the caller.
Exploit preconditions
- Attack surface: The authenticated
PUT /hr/passAPI endpoint - Required access: A valid authenticated account
- Required knowledge: The target account ID and that account's current password
- Trigger point: Submission of a password-change request naming the target account
- Why exploitation is possible: The server fails to bind the supplied account ID to the authenticated caller before changing the password
Why this happens
The underlying flaw is an object-level authorization failure. The endpoint accepts a user-controlled account identifier and uses it to select the password target without verifying that the authenticated principal is permitted to modify that account. This behavior maps to CWE-639: Authorization Bypass Through User-Controlled Key, because an attacker can influence which protected object is accessed through an identifier that is not adequately authorized.
Potential impact
- An attacker may change passwords for accounts they do not control
- Target users could lose access to their accounts
- Compromised accounts could be used to access protected business or personal information
- Attackers could conduct further actions using accounts whose passwords were changed
- Account recovery and administrative workflows could be disrupted
General mitigation guidance
Mitigation generally focuses on enforcing authorization at the resource level rather than relying only on authentication or client-supplied identifiers.
Common defensive patterns include:
- Deriving the password-change target from the authenticated session where self-service changes are intended
- Performing a server-side ownership or role check before modifying any account
- Applying deny-by-default authorization policies to account-management operations
- Treating account IDs and other object references as untrusted input
- Requiring appropriate reauthentication or current-credential verification without treating it as a substitute for authorization
- Limiting administrative capabilities through least-privilege roles and narrowly scoped permissions
How teams detect issues like this
Organizations can look for:
- Static analysis and code review rules that flag account updates based directly on request-supplied identifiers
- Review signals where authenticated identity and target-object identity are not explicitly compared
- API tests that attempt cross-account password changes using valid credentials
- Authorization-policy checks covering self-service and administrative account-management paths
- Audit logs showing password changes where the actor and affected account differ unexpectedly
Automated security testing and API authorization scanners may help identify missing object-level access checks.

