Summary
A broken object-level authorization flaw in the /Contact/Persons/PersonController.php endpoint of Webkul Krayin CRM v2.2.x allows authenticated users to access contacts they do not own by manipulating request parameters.
By crafting specific GET requests, an attacker can read, modify, or permanently delete other users' contacts, violating data confidentiality and integrity within the CRM.
Affected context
This vulnerability occurs in deployments of Webkul Krayin CRM v2.2.x where the contact management functionality is exposed to authenticated users via the /Contact/Persons/PersonController.php endpoint.
It manifests when the application uses client-supplied identifiers (such as contact IDs) to select records without re-validating that the requesting user owns or is permitted to access the targeted contact.
Any multi-tenant or multi-user environment where users manage separate contact lists is particularly exposed, because missing authorization checks allow crossing those logical boundaries.
Exploit preconditions
- Attack surface: HTTP(S) interface of the Krayin CRM contact management endpoints.
- Required access: Valid authenticated user account with access to the contacts module.
- Trigger point: Submission of a crafted GET request that references a contact belonging to another user (for example, by adjusting an ID or query parameter).
- Why exploitation is possible: The server-side logic relies on the presence of a valid session but does not enforce per-object authorization, allowing users to operate on records they do not own as long as they can guess or enumerate their identifiers.
Why this happens
The underlying issue is a missing object-level authorization check when handling contact resources in PersonController.php.
The controller trusts the client-supplied identifier (e.g., contact ID) as long as the requester is authenticated, without verifying that the contact belongs to the current user or that the user has explicit rights to view, modify, or delete it.
This maps to CWE-639: Authorization Bypass Through User-Controlled Key, where access control decisions are not properly bound to individual resources and object identifiers are treated as trustworthy input.
Potential impact
- Unauthorized reading of contact details owned by other users or tenants.
- Unauthorized modification of other users' contacts, including changing names, phone numbers, email addresses, and associated metadata.
- Permanent deletion of contacts belonging to other users, leading to data loss.
- Violation of privacy and regulatory obligations where contact data includes personal or sensitive information.
- Abuse of contact data for social engineering, phishing, or competitive intelligence gathering.
General mitigation guidance
Effective mitigation focuses on enforcing consistent, server-side object-level authorization for every operation on contact records:
- Implement centralized authorization checks that verify ownership or explicit permissions for each contact before returning, updating, or deleting it.
- Use the authenticated user's identity from the session or token as part of the query criteria when fetching contacts, rather than trusting IDs from the client alone.
- Apply the principle of least privilege, ensuring that roles and permissions are narrowly scoped and cannot operate on global sets of contacts unless explicitly intended.
- Normalize access-control logic (e.g., middleware, policy classes, or access-control services) so that all endpoints dealing with contacts reuse the same authorization decisions.
- Design APIs to avoid exposing sequential or easily enumerable identifiers where possible, or combine them with tenant- or owner-specific scoping to reduce guessing.
How teams detect issues like this
Detection typically combines code-level review with behavioral analysis:
- Static analysis and code review: Look for controller actions that:
- Accept object identifiers (e.g., contact IDs) via query parameters or route variables.
- Perform database lookups solely by ID without also constraining by the current user or tenant context.
- Lack calls to a common authorization policy, guard, or middleware before performing read/update/delete operations.
- Automated testing: Implement authorization-focused tests that:
- Attempt to access, modify, or delete contacts created under one account using a different account.
- Enumerate IDs to confirm that cross-user access is blocked consistently across all contact-related endpoints.
- Runtime monitoring: Review access logs and application telemetry for patterns such as:
- One user ID accessing a large range of contact IDs.
- Frequent 403/404 responses followed by successful access, suggesting probing for valid object IDs.
- Tooling: API security scanners and SAST tools with rules for object-level authorization can help flag endpoints where user-controlled IDs are used without explicit authorization checks.

