Summary
Frappe HRMS has a missing permission check on an endpoint that lists company details. Any authenticated user, including users with the Employee role, may be able to view all companies on the site and their default currencies, regardless of their permissions.
Affected context
The issue affects Frappe HRMS versions from 16.0.0 before 16.20.1. It occurs in the company-listing endpoint when the endpoint returns company details without checking whether the authenticated user is authorized to view each company.
Exploit preconditions
- Attack surface: The affected company-listing endpoint
- Required access: An authenticated account on the Frappe HRMS site; the Employee role may be sufficient
- Trigger point: A request to the endpoint that lists company details
- Why exploitation is possible: The endpoint does not enforce the required permission check before returning company data
Why this happens
The underlying issue is a missing authorization check, mapped to CWE-862: Missing Authorization. The endpoint exposes data without verifying that the requesting user has permission to access it. Authentication alone does not establish authorization to view every company.
Potential impact
- Authenticated users may view company details outside their permissions.
- Company names and default currencies could be disclosed across the site.
- Exposed organizational information could support further targeting or reconnaissance.
General mitigation guidance
Common defensive patterns include:
- Enforcing server-side authorization checks on every data-access path.
- Applying permission checks to the specific records and fields returned by an endpoint.
- Denying access by default when permissions are missing, ambiguous, or cannot be verified.
- Limiting returned data to the minimum required for the user's task.
- Testing authorization behavior across roles and permission boundaries.
How teams detect issues like this
Review endpoints that list or retrieve company records for server-side authorization checks, including checks applied to every returned record. Use static analysis and code review to identify data-access paths that rely on authentication without checking permissions. Add automated tests that verify restricted roles cannot retrieve records outside their access, and use policy enforcement to require authorization checks for sensitive data endpoints.

