/

CVE-2026-38530

Severity:

HIGH RISK

(8.1)

Broken Object-Level Authorization (BOLA) in Webkul Krayin

CVE-2026-38530

Analyzed

Vulnerability type

Category:

Broken Object-Level Authorization (BOLA)

CWE:

CWE-639

Impact:

Horizontal Privilege Escalation and Data Tampering

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A broken object-level authorization flaw in the LeadController endpoint of Webkul Krayin CRM v2.2.x allows authenticated users to access lead records they do not own by manipulating request parameters.

By sending crafted GET requests, an attacker can arbitrarily read, modify, or permanently delete leads belonging to other users, violating data confidentiality and integrity within the CRM.

Affected context

This vulnerability occurs in deployments of Webkul Krayin CRM v2.2.x where the /Controllers/Lead/LeadController.php endpoint is exposed to authenticated users.

The issue arises when the application relies on user-supplied identifiers (such as lead IDs) to fetch and manipulate lead records without enforcing per-object ownership or permission checks.

Any environment where multiple users manage leads through the same CRM instance, especially multi-tenant or multi-team setups, is at heightened risk of unauthorized data access and manipulation.

Exploit preconditions

  • Attack surface: HTTP(S) API exposed by the CRM, specifically the LeadController-related endpoints.
  • Required access: Valid authenticated account on the CRM (even with low privileges).
  • Trigger point: Submission of crafted GET requests that reference lead IDs owned by other users.
  • Why exploitation is possible: The application authorizes the user at a session level but does not verify that the requested lead object is owned by, or accessible to, the current user. As a result, arbitrary object identifiers can be supplied to operate on other users' leads.

Why this happens

The root cause is a missing object-level authorization check when operating on lead entities in the LeadController.

While the application appears to authenticate users, it fails to enforce that the current user is authorized to access a specific lead identified in the request parameters.

This aligns with CWE-639: Authorization Bypass Through User-Controlled Key, where user-controllable object identifiers (such as numeric IDs or UUIDs) are trusted without verifying ownership or access rights.

Abstractly, the insecure pattern is: load_object(request.id) followed by business operations, without a mandatory ensure_user_can_access(current_user, object) check on every read, update, or delete operation.

Potential impact

  • Authenticated users may read leads owned by other users or teams, exposing sensitive business and customer data.
  • Attackers could modify fields of other users' leads, corrupting pipelines, notes, or deal values.
  • Leads can be permanently deleted, causing data loss and disrupting sales or support workflows.
  • Audit trails and reporting may be skewed, as unauthorized changes are recorded under legitimate user sessions.
  • In multi-tenant or partner environments, one tenant's user could potentially access another tenant's leads if tenancy boundaries rely on lead ownership alone.

General mitigation guidance

Effective mitigation focuses on enforcing strict, consistent object-level authorization for all lead operations:

  • Introduce centralized permission checks that validate ownership or role-based access before reading, updating, or deleting any lead record.
  • Treat all client-supplied identifiers (e.g., lead IDs in path or query parameters) as untrusted and always resolve them in the context of the current user or tenant.
  • Use an access-control layer (policy objects, middleware, or declarative authorization rules) that is applied uniformly to controller actions dealing with leads.
  • Ensure that database queries are scoped by user or tenant where applicable (for example, adding mandatory filters for owner, team, or tenant identifiers).
  • Prefer secure-by-default patterns where controllers only operate on objects derived from the authenticated user's context, rather than free-form IDs directly from the request.
  • Limit the privileges of general user roles so that damage from any single compromised account is reduced.

How teams detect issues like this

Detection typically involves both code-centric and behavior-centric approaches:

  • Static analysis and code review:
  • Search for controller actions in LeadController.php that accept IDs from request parameters and directly load lead records without calling a shared authorization check.
  • Flag patterns where authorization is performed once at login but not re-evaluated per object, especially on read, update, and delete handlers.
  • Review database queries for missing ownership or tenant scoping (e.g., WHERE id = ? without AND owner_id = current_user or equivalent).
  • Automated testing and security scanning:
  • Implement API tests that attempt to access or modify leads created under other test users by varying object IDs.
  • Leverage DAST tools configured with multiple accounts to probe for ID-based horizontal privilege escalation.
  • Operational monitoring:
  • Monitor access logs for accounts accessing large ranges of lead IDs or leads associated with multiple different owners.
  • Use anomaly detection to flag unusual cross-user access patterns within the CRM.

Sources

SourceLink
github.comgithub.com/TREXNEGRO/Security-Advisories/tree/main/CVE-2026-38530
github.comgithub.com/krayin/laravel-crm

Frequently asked

questions

Yes. Any attacker who can reach the CRM's HTTP(S) interface and obtain valid credentials can exploit the issue remotely by sending crafted requests to the LeadController endpoints.

The attacker only needs a basic authenticated account in the CRM. Elevated roles are not required, because the weakness is in object-level authorization, not in role-level checks.

Implement strict, centralized object-level authorization for all lead operations. Each time a lead is read, updated, or deleted, the system should verify that the current user (or their tenant/team) is explicitly allowed to access that specific lead, and enforce this check at the controller or data-access layer.

Adopt a consistent access-control design where:

  • All object access goes through well-defined authorization policies.
  • Controllers never operate directly on IDs from the client without verifying ownership or permissions.
  • Automated tests and security reviews explicitly cover horizontal privilege escalation scenarios for each entity type (leads, contacts, deals, etc.).
Find out what's already
exploitable in your codebase.