/

CVE-2026-39351

Severity:

CRITICAL RISK

(9.1)

Missing Authorization in Frappe Doctype API Access

CVE-2026-39351

Analyzed

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized Data Access and Manipulation

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

Frappe exposed unrestricted access to DocTypes via its API, allowing requests to bypass intended authorization checks.

When exploited, an attacker who can reach the API may access or manipulate DocType data that should be restricted to specific users or roles.

Affected context

The vulnerability exists in Frappe-based applications where DocTypes are exposed through the framework's API layer.

It is relevant in deployments that rely on Frappe's built-in permission system to restrict access to specific DocTypes and records.

In affected versions, certain API endpoints can be invoked in a way that bypasses or fails to enforce these access controls, especially in multi-tenant, multi-user, or role-based setups.

Exploit preconditions

  • Attack surface: Frappe HTTP API endpoints that expose DocType operations (e.g., read, list, create, update, delete).
  • Required access: Ability to send requests to the application's API endpoint; in many deployments this may be over the public internet.
  • Trigger point: Calling Doctype-related API routes that do not adequately enforce per-user authorization checks.
  • Why exploitation is possible: The authorization layer does not consistently verify whether the calling principal is permitted to access the requested DocType or records, resulting in operations being processed without proper permission validation.

Why this happens

This issue stems from incomplete or missing authorization checks around Frappe DocType access when invoked via the API.

Instead of enforcing role- and record-level permissions on every API request, certain code paths either assume the caller is authorized or rely on implicit trust in client-supplied parameters.

This aligns with CWE-862: Missing Authorization, where the system fails to verify that a user is permitted to perform an action before executing it, particularly in generic or helper endpoints that wrap core data-access logic.

Potential impact

  • Attackers could read sensitive information from DocTypes intended to be restricted to specific roles or users.
  • Malicious users may create, modify, or delete records in protected DocTypes, impacting data integrity.
  • Multi-tenant or multi-customer data boundaries could be crossed, exposing other tenants' data.
  • Abuse of administrative or configuration DocTypes may lead to privilege escalation or further compromise of the application.
  • Regulatory and compliance violations due to unauthorized disclosure of personal or confidential data.

General mitigation guidance

Mitigation focuses on enforcing strict, explicit authorization checks on all DocType-related API operations.

Recommended patterns include:

  • Centralizing authorization logic so that every DocType access (read, write, list, delete) is mediated through a uniform permission layer.
  • Applying a deny-by-default policy: treat all DocTypes as inaccessible unless explicitly allowed for a given role, user, or context.
  • Using least-privilege role design, ensuring that API tokens, service accounts, and users only have access to the DocTypes and operations they genuinely need.
  • Avoiding direct, generic data-access APIs that bypass the normal permission framework; instead, route access through well-defined service functions that always enforce authorization.
  • Implementing defense-in-depth with additional business-level checks (e.g., tenant IDs, ownership validation, row-level filters) on top of role-based permissions.

How teams detect issues like this

Effective detection typically combines code-level analysis with runtime monitoring:

  • Static analysis: Search for DocType API handlers and routes that perform database operations without invoking standard permission-checking helpers or middleware.
  • Code review: Examine generic API endpoints, developer utilities, or "internal use" routes for missing role or ownership checks, and confirm that all DocType accesses go through the standardized authorization layer.
  • Policy enforcement: Introduce architectural rules (e.g., via linters, custom checks, or CI hooks) to prevent direct DocType access outside approved service interfaces.
  • Logging and monitoring: Enable detailed audit logs for DocType API access and alert on anomalous patterns such as large enumerations of sensitive DocTypes, cross-tenant access, or unusual access from low-privileged accounts.

Sources

SourceLink
github.comgithub.com/frappe/frappe/security/advisories/GHSA-8ggw-hfr6-rw3x

Frequently asked

questions

Yes. If the Frappe application's API is reachable over the network (for example, from the public internet), an attacker can exploit the missing authorization checks remotely by crafting requests to vulnerable DocType endpoints.

The attacker generally needs the ability to send HTTP requests to the Frappe API. Depending on configuration, exploitation might be possible with a low-privileged account, a compromised API key, or in some misconfigurations, even without authentication if endpoints are inadvertently exposed.

Ensure that every DocType operation invoked through the API is gated by centralized and explicit authorization checks. Adopt a deny-by-default approach and route all DocType accesses through vetted service functions or middleware that consistently enforce role, ownership, and tenant boundaries.

Design the application so that authorization is not optional: use a single, reusable permission layer for data access, enforce architectural rules against bypassing it, and integrate security-focused code reviews and automated checks to catch any new API routes that lack proper access control.

Find out what's already
exploitable in your codebase.