Summary
Frappe ERPNext reporting endpoints may fail to enforce authorization checks that limit which companies' data a user can access. A low-privilege authenticated user who can reach an affected endpoint may be able to request reports containing other companies' tax, payment, and financial information.
Affected context
The issue concerns financial reporting endpoints in Frappe ERPNext versions before 16.35.0. It becomes risky when a reporting request does not adequately verify that the authenticated user's permissions cover the requested company or data scope.
Exploit preconditions
- Attack surface: Financial reporting endpoints accessible to authenticated users
- Required access: A valid account with low privileges and the ability to send requests to an affected endpoint
- Trigger point: A crafted request for a report or data scope beyond the user's permitted access
- Why exploitation is possible: Authorization checks may be missing or insufficiently applied to the requested company or records
Why this happens
The underlying issue is missing or incomplete server-side authorization enforcement, mapping to CWE-862: Missing Authorization. An endpoint may accept a request from an authenticated user without verifying that the user is permitted to access the requested company's report data. Authentication establishes identity, but does not by itself authorize access to every company or record.
Potential impact
- Users may access tax and payment data belonging to other companies
- Personal and corporate identifiers may be disclosed
- Financial totals may be exposed, affecting confidentiality and business privacy
- Exposed information could be used for fraud, targeted social engineering, or other follow-on abuse
General mitigation guidance
Defensive approaches generally focus on enforcing authorization at every server-side reporting boundary.
Common patterns include:
- Check the user's permissions for each requested company, report, and data scope
- Apply access controls consistently across endpoint variants and report-generation paths
- Derive permitted data scope from trusted server-side identity and policy context rather than client-supplied values
- Use deny-by-default authorization and least-privilege role assignments
- Test that users cannot access records outside their authorized scope
How teams detect issues like this
High-level detection approaches include:
- Review reporting endpoints for server-side permission checks tied to the requested company and records
- Use static analysis or code review rules to flag sensitive data access without an authorization decision
- Test with accounts of different roles and verify that changing request scope does not expose unauthorized data
- Monitor report requests and access patterns for unusual cross-company data retrieval
- Enforce policies requiring authorization tests for endpoints that return sensitive financial or personal information

