/

CVE-2024-58390

Severity:

HIGH RISK

(8.8)

Improper Privilege Management (CWE-269) in Frappe App

CVE-2024-58390

Deferred

Vulnerability type

Category:

Improper Privilege Management

CWE:

CWE-269

Impact:

Privilege Escalation

Severity:

HIGH RISK

(8.8)

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 contains an improper privilege management vulnerability in a document action that can allow an authenticated Website User to obtain System Manager privileges. The issue becomes risky when a lower-privileged user can invoke the affected action and combine it with additional application behavior to bypass intended authorization boundaries.

Frappe contains an improper privilege management vulnerability in a document action that can allow an authenticated Website User to obtain System Manager privileges. The issue becomes risky when a lower-privileged user can invoke the affected action and combine it with additional application behavior to bypass intended authorization boundaries.

Affected context

The vulnerability affects Frappe deployments where Website Users can access the affected document action and where authorization checks do not fully restrict the resulting operation. Exploitation depends on the application's document permissions, enabled workflows, and any additional actions available to the authenticated user.

The vulnerability affects Frappe deployments where Website Users can access the affected document action and where authorization checks do not fully restrict the resulting operation. Exploitation depends on the application's document permissions, enabled workflows, and any additional actions available to the authenticated user.

Exploit preconditions

  • Attack surface: Authenticated Frappe application functionality involving a

document action

  • Required access: A valid account with Website User privileges - Trigger point: Invocation of the affected document action in a context where

authorization is insufficient

  • Additional condition: The attacker must be able to combine the action with

other available application behavior

  • Why exploitation is possible: The authorization model permits a lower-

privileged role to reach a path that can grant or expose System Manager

capabilities

  • Attack surface: Authenticated Frappe application functionality involving a

document action

  • Required access: A valid account with Website User privileges - Trigger point: Invocation of the affected document action in a context where

authorization is insufficient

  • Additional condition: The attacker must be able to combine the action with

other available application behavior

  • Why exploitation is possible: The authorization model permits a lower-

privileged role to reach a path that can grant or expose System Manager

capabilities

Why this happens

The underlying bug is an authorization design failure in which a document action does not consistently enforce the caller's effective privileges and the sensitivity of the resulting operation. This allows a Website User to cross a role boundary through chained application behavior, mapping to CWE-269, Improper Privilege Management. The insecure pattern is treating document-level access or action availability as sufficient authorization for operations that require administrative privileges.

The underlying bug is an authorization design failure in which a document action does not consistently enforce the caller's effective privileges and the sensitivity of the resulting operation. This allows a Website User to cross a role boundary through chained application behavior, mapping to CWE-269, Improper Privilege Management. The insecure pattern is treating document-level access or action availability as sufficient authorization for operations that require administrative privileges.

Potential impact

  • An attacker may obtain System Manager privileges
  • Unauthorized users could modify administrative or application settings
  • The attacker could access or alter protected data
  • The compromised account could be used to affect other users or workflows
  • Administrative control could enable further application compromise
  • An attacker may obtain System Manager privileges
  • Unauthorized users could modify administrative or application settings
  • The attacker could access or alter protected data
  • The compromised account could be used to affect other users or workflows
  • Administrative control could enable further application compromise

General mitigation guidance

Mitigation generally focuses on enforcing authorization at every sensitive document action and at the server-side operation that performs the change. Secure-by-default designs should deny administrative operations unless the caller's role and object-level permissions explicitly permit them. Reduce trust in client-side role indicators and document visibility, validate the complete authorization context on the server, separate Website User capabilities from administrative functions, and apply least privilege to service and user accounts. Security-sensitive actions should also use explicit allowlists, consistent permission checks, and auditable authorization decisions.

Mitigation generally focuses on enforcing authorization at every sensitive document action and at the server-side operation that performs the change. Secure-by-default designs should deny administrative operations unless the caller's role and object-level permissions explicitly permit them. Reduce trust in client-side role indicators and document visibility, validate the complete authorization context on the server, separate Website User capabilities from administrative functions, and apply least privilege to service and user accounts. Security-sensitive actions should also use explicit allowlists, consistent permission checks, and auditable authorization decisions.

How teams detect issues like this

Detection can include static analysis and review of document actions that perform role changes, permission updates, or other administrative effects. Code review should look for client-only authorization, missing server-side checks, permission decisions based on document visibility alone, and chained actions that cross role boundaries. Runtime monitoring can flag unusual privilege changes or administrative operations initiated by Website User accounts. Policy enforcement in CI can require authorization tests for every sensitive document action, and automated code-review tools may help identify inconsistent permission checks.

Detection can include static analysis and review of document actions that perform role changes, permission updates, or other administrative effects. Code review should look for client-only authorization, missing server-side checks, permission decisions based on document visibility alone, and chained actions that cross role boundaries. Runtime monitoring can flag unusual privilege changes or administrative operations initiated by Website User accounts. Policy enforcement in CI can require authorization tests for every sensitive document action, and automated code-review tools may help identify inconsistent permission checks.

Sources

SourceLink
github.comgithub.com/frappe/frappe/security/advisories/GHSA-gjqf-v2f6-962h
vulncheck.comvulncheck.com/advisories/frappe-before-15.41.0-privilege-escalation-via-document-action

Frequently asked

questions

Exploitation requires authentication with Website User access and depends on

the affected document action and related application behavior being available.

The described issue requires an authenticated Website User, so unauthenticated

access alone is not sufficient.

Enforce server-side, least-privilege authorization for the affected action and

every resulting administrative operation, using explicit role and

object-level checks.

Treat client input and document visibility as untrusted, maintain clear

separation between user and administrator capabilities, and include

authorization tests and monitoring for privilege-changing workflows.

Exploitation requires authentication with Website User access and depends on

the affected document action and related application behavior being available.

The described issue requires an authenticated Website User, so unauthenticated

access alone is not sufficient.

Enforce server-side, least-privilege authorization for the affected action and

every resulting administrative operation, using explicit role and

object-level checks.

Treat client input and document visibility as untrusted, maintain clear

separation between user and administrator capabilities, and include

authorization tests and monitoring for privilege-changing workflows.

Find out what's already
exploitable in your codebase.