/

CVE-2026-25197

Severity:

CRITICAL RISK

(9.1)

Insecure Direct Object Reference (IDOR) in Authenticated

CVE-2026-25197

Analyzed

Vulnerability type

Category:

Insecure Direct Object Reference (IDOR)

CWE:

CWE-639

Impact:

Horizontal Privilege Escalation and Account Data Exposure

Severity:

CRITICAL RISK

(9.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

An insecure direct object reference (IDOR) in a user profile API endpoint allows authenticated users to access other users' profiles by modifying the numeric ID in the request.

When authorization checks are based solely on user-supplied identifiers rather than the caller's identity and permissions, attackers can pivot across accounts and potentially access sensitive data at scale.

Affected context

This vulnerability occurs in an authenticated API endpoint that serves user profile data based on an id parameter supplied by the client.

The issue typically appears where:

  • The application trusts client-controlled identifiers (e.g., /api/users/{id}) to select records
  • Authorization logic verifies that the caller is authenticated, but not that they are the rightful owner of the requested resource
  • Object-level access control is missing or inconsistently enforced on profile read operations

It is most relevant in multi-user systems where profiles or account data are mapped to predictable numeric IDs or similar direct keys.

Exploit preconditions

  • Attack surface: Authenticated web or mobile API endpoint that returns user profile data
  • Required access: Valid user account or session; no elevated privileges needed
  • Trigger point: An HTTP request where the attacker can modify the id (path parameter, query string, or body field) to reference another user's profile
  • Why exploitation is possible: The backend uses the provided id directly to look up and return a profile record without confirming that the authenticated caller is authorized for that specific resource, enabling horizontal privilege escalation through simple ID manipulation.

Why this happens

The underlying bug is a missing object-level authorization check, matching CWE-639: Authorization Bypass Through User-Controlled Key.

Instead of deriving the profile to be returned from the authenticated principal (e.g., session user ID, token subject) or verifying ownership/permissions, the endpoint trusts a client-controlled identifier to select database records.

This pattern leads to insecure direct object references (IDOR), where predictable or enumerable identifiers (like incremental integers) allow users to pivot across resources that should be isolated per account.

Potential impact

  • Unauthorized reading of other users' profile information and associated personal data
  • Enumeration of all user profiles by iterating over ID values
  • Exposure of sensitive fields that may aid further attacks (e.g., email addresses, internal IDs, metadata)
  • Regulatory and compliance impacts where personal or regulated data is exposed across accounts
  • Loss of user trust due to cross-account data leakage

General mitigation guidance

Effective mitigation focuses on enforcing object-level access control and reducing reliance on client-controlled identifiers:

  • Derive the target user profile from the authenticated identity (e.g., from the session or token claims) instead of trusting an id parameter for self-profile endpoints.
  • Where access to other users' profiles is legitimate (e.g., admin or support tools), enforce explicit authorization checks tying each requested object to the caller's role and permissions.
  • Introduce a dedicated authorization layer or middleware that evaluates access for every object fetch or mutation operation.
  • Avoid using predictable identifiers as the sole reference when isolation is expected; consider opaque, non-enumerable identifiers or indirection layers where appropriate.
  • Apply the principle of least privilege to API roles so that standard users cannot access data beyond their own resources, even if request parameters are manipulated.

How teams detect issues like this

Detection typically combines security testing, code review, and automated checks:

  • Perform targeted authorization testing in QA and security assessments by manipulating IDs in authenticated API requests to confirm isolation between accounts.
  • Use static analysis or custom linting rules to flag controllers/services that:
  • Accept resource IDs from clients
  • Query database records directly by those IDs
  • Lack adjacent authorization checks or ownership validation.
  • In code review, look for endpoints that read objects by ID and verify that each includes a clear authorization decision, not just authentication.
  • Implement centralized authorization policies (e.g., policy-as-code) and require that all data-access layers call these policies when resolving user-owned resources.
  • Monitor logs for unusual patterns such as single accounts accessing large ranges of IDs or sequential profile IDs, which may indicate IDOR probing.

Sources

SourceLink
github.comgithub.com/cisagov/CSAF/blob/develop/csaf_files/OT/white/2026/icsa-26-055-03.json
mygardyn.commygardyn.com/security/
cisa.govcisa.gov/news-events/ics-advisories/icsa-26-055-03

Frequently asked

questions

Yes. Any remote user who can authenticate to the application and reach the affected profile API can typically exploit the issue by changing the id value in their requests.

No elevated privileges are usually required. A standard user account with access to their own profile endpoint is often sufficient to pivot into other users' profiles if authorization checks are missing.

The most robust fix is to enforce object-level authorization: derive the resource from the authenticated principal where possible (e.g., "my profile" endpoints), or explicitly validate that the caller is permitted to access the requested object before returning any data.

Adopt a consistent access-control strategy where every object access goes through a shared authorization layer, minimize reliance on client-controlled identifiers for sensitive resources, and integrate authorization-focused tests and code review guidelines into your development lifecycle.

Find out what's already
exploitable in your codebase.