Summary
Mercur @mercurjs/core before 2.3.2 has a missing object-level authorization check that may let an authenticated vendor access another seller's store by changing an ID in a request path. Depending on the affected operation, this could expose payment and tax details, allow changes to profiles or addresses, or enable team-management actions that lead to store takeover.
Affected context
The issue concerns vendor-facing operations in Mercur @mercurjs/core before 2.3.2 that use an ID from the request path to identify a seller or store resource. It becomes risky when the application authenticates the requester but does not also verify that the requester is authorized to act on the specific resource identified by that ID.
Exploit preconditions
- Attack surface: Vendor-facing API operations that accept a resource ID in the path
- Required access: An authenticated vendor account
- Trigger point: A request to an operation using a substituted
:idpath parameter - Why exploitation is possible: The application may not consistently check that the requested seller or store belongs to, or is accessible by, the authenticated vendor
Why this happens
The underlying flaw is missing object-level authorization: authentication establishes who is making a request, but the application does not adequately verify whether that user may access or modify the particular object named by the request. This maps to CWE-639: Authorization Bypass Through User-Controlled Key, where a user-controlled identifier can be changed to reach another user's data or actions.
Potential impact
- Attackers may read another seller's payment or tax details.
- Attackers could overwrite another vendor's profile or addresses.
- Attackers may invite, remove, or change the roles of team members.
- Team-management abuse could lead to takeover of another vendor's store.
General mitigation guidance
Mitigation generally centers on enforcing authorization for every resource operation, not merely checking that a user is authenticated.
Common defensive patterns include:
- Resolve requested resources within the authenticated vendor's authorized scope.
- Apply server-side ownership and role checks to reads, updates, and team-management actions.
- Use deny-by-default authorization policies for sensitive operations.
- Minimize vendor privileges and separate permissions for viewing data, editing settings, and managing team members.
- Avoid treating client-supplied identifiers as proof of access.
How teams detect issues like this
Useful review and detection approaches include:
- Static analysis or code review checks for path parameters used in database lookups or mutations without an adjacent authorization check.
- Reviewing vendor API handlers for consistent ownership and role enforcement across read and write operations.
- Testing access-control policies with accounts belonging to different vendors, including checks for cross-vendor access.
- Enforcing centralized authorization policies and requiring security tests for endpoints that accept object identifiers.
Automated code review tools may help identify user-controlled IDs that reach sensitive operations without clear authorization.

