Summary
ERPNext has missing or inconsistent record-level authorization checks in some endpoints, reports, and forms. An authenticated low-privilege user may be able to name records outside their permitted scope to view sensitive information or make constrained changes.
Affected context
The issue affects Frappe ERPNext before 15.124.2 and 16.x before 16.53.0. It occurs in several endpoints, reports, and forms when requests can reference records without consistently checking whether the authenticated user's role and company scope permit access.
Exploit preconditions
- Attack surface: Affected ERPNext endpoints, reports, or forms
- Required access: An authenticated account with low privileges
- Trigger point: A request that references a record outside the user's authorized scope
- Why exploitation is possible: Record-level authorization is not consistently enforced for the requested operation
Why this happens
The underlying issue is a failure to authorize access to individual records. This maps to CWE-862: Missing Authorization: an application handles a request without reliably verifying that the authenticated user is permitted to perform the requested action on the specific record. Authentication alone does not establish permission to access every record.
Potential impact
- Users may read other companies' financial, stock, pricing, or contact data.
- Attackers could make constrained changes to records outside their authorized scope.
- Exposed information could support further fraud, privacy violations, or targeted attacks.
General mitigation guidance
Defensive patterns focus on enforcing authorization at the point where each record is accessed or changed.
- Apply centralized, deny-by-default authorization checks to every read and write path.
- Derive permitted records from the authenticated user's role and scope rather than trusting record identifiers supplied by clients.
- Recheck authorization in reports, forms, and indirect or bulk operations.
- Limit user and service-account privileges to the records and actions required for their work.
- Treat authorization as separate from input validation and authentication.
How teams detect issues like this
- Use static analysis or code review to find record retrieval and mutation paths that lack an authorization check.
- Review endpoints, reports, and forms for reliance on client-supplied record identifiers or filters.
- Add tests that verify users cannot read or modify records across role and company boundaries.
- Enforce policies requiring authorization checks for record-level access, including bulk operations.

