Summary
Zr.Admin.NET contains an insecure direct object reference in profile updates that may let an authenticated user change another account's details by supplying its user ID. If the affected profile is an administrator's, changing the phone number may enable account takeover through the phone-based login flow.
Affected context
The issue is reported in Zr.Admin.NET commits af07ffc through eb9228a, in SysProfileController.UpdateProfile. It arises when the profile update operation accepts a UserId without adequately verifying that the authenticated user is authorized to modify the corresponding account. The risk is greater where phone verification and phone-based login rely on the phone number stored in that profile.
Exploit preconditions
- Attack surface: The profile update functionality and associated phone-based authentication flows
- Required access: An authenticated account able to reach the profile update operation
- Trigger point: Processing a profile update that identifies an account using a user-supplied
UserId - Why exploitation is possible: The operation may not enforce that the requested account belongs to the authenticated user or that the user has permission to modify it
- Additional condition for account takeover: The affected account's phone number and the phone-login verification process must be usable by the attacker
Why this happens
The underlying issue is a missing or insufficient authorization check on an object selected by a user-controlled identifier. This maps to CWE-639: Authorization Bypass Through User-Controlled Key. The insecure pattern is trusting a supplied account ID to determine which record can be modified without independently checking the caller's authorization for that record.
Potential impact
- An attacker may modify profile details belonging to other users.
- An attacker could change an administrator's phone number if the affected update path permits it.
- Phone-based authentication may enable takeover of an account whose phone number was changed.
- Unauthorized account access could lead to further changes or exposure of data available to that account.
General mitigation guidance
Common defensive patterns include:
- Deriving the target account from the authenticated identity for self-service profile operations, rather than trusting a client-supplied account ID.
- Enforcing object-level authorization on every update, including checks that privileged changes are permitted.
- Treating phone-number changes as sensitive operations and requiring appropriate verification of the new number.
- Keeping authentication identifiers and recovery flows resistant to unverified profile changes.
- Applying least privilege to account-management functions and separating administrative operations from ordinary profile updates.
How teams detect issues like this
Review profile and account-management endpoints for updates that use client-supplied identifiers to select records. Check that authorization is enforced for the specific target object, not merely that the caller is authenticated. Static analysis and code review can look for request-bound IDs passed to data modification operations without nearby ownership or permission checks. Policy tests can verify that users cannot alter other users' profiles or sensitive authentication attributes.

