Summary
An Accounts endpoint in Frappe ERPNext checks a broad role permission but may not verify that the caller is authorized to update the specific payment document. An authenticated Accounts User could therefore alter bank clearance dates on documents outside their permitted company or User Permissions, or on documents that have already been submitted.
Affected context
The issue occurs in an Accounts module endpoint that records bank clearance dates. Risk arises when the endpoint accepts a caller-named payment document and relies on a general role check without adequately enforcing document-level authorization, company boundaries, or restrictions on submitted records.
Exploit preconditions
- Attack surface: An Accounts endpoint for recording bank clearance dates
- Required access: An authenticated Accounts User
- Trigger point: A request that identifies a payment document to update
- Why exploitation is possible: The endpoint checks a broad role permission but may not enforce the caller's permissions for the specific document or its status
Why this happens
The underlying issue is missing authorization at the object level. A general role check does not establish that a user may modify every caller-named payment document; failing to verify document ownership, company scope, and state before writing maps to CWE-862: Missing Authorization.
Potential impact
- Unauthorized changes to bank clearance dates could undermine reconciliation accuracy
- Payment records belonging to other companies or outside a user's permissions could be altered
- Updates to submitted documents could weaken financial controls and audit reliability
General mitigation guidance
Defensive patterns include checking authorization for the specific document and requested operation at the point of every write. Enforce company and User Permission boundaries, validate that the document is in a state that permits the change, and avoid treating a broad role check as sufficient authorization. Prefer secure-by-default access controls and limit service and user privileges to the records and actions needed.
How teams detect issues like this
Review endpoint code for writes to documents selected from caller-supplied identifiers, especially where checks stop at role-level permissions. Use static analysis and code review to look for missing object-level authorization, company-scope checks, and state validation before writes. Policy tests can verify that users cannot change records outside their permitted scope or modify records in disallowed states; audit logs can help identify unexpected clearance-date changes.

