Summary
ZongXR Supermarket contains a missing authentication vulnerability in the order-saving endpoint. A remote attacker may manipulate the userId argument to submit orders without successfully proving their identity, when the endpoint is reachable and authorization checks are absent or incomplete.
Affected context
The issue occurs in the OrderController.addOrder function within the order component of ZongXR Supermarket 1.0.0.0. It is relevant when the save endpoint accepts a caller-controlled userId and relies on that value without consistently enforcing authentication and authorization before processing the order.
Exploit preconditions
- Attack surface: Remotely accessible order save endpoint
- Required access: Network access to the endpoint; a valid authenticated session may not be required
- Trigger point: Processing an order request through
OrderController.addOrder - Relevant input: The caller-controlled
userIdargument - Why exploitation is possible: The endpoint may trust the supplied identity value without verifying that the caller is authenticated and authorized to act for that user
Why this happens
The underlying issue is an authentication boundary failure. The order endpoint uses an identity value supplied in the request instead of deriving the user identity from a trusted authenticated session or token and enforcing authorization for the requested action.
This maps primarily to CWE-306: Missing Authentication for Critical Function. It is also related to CWE-287: Improper Authentication, because the application may fail to adequately verify the identity associated with the order operation.
Potential impact
- An unauthenticated attacker may create orders
- Attackers could impersonate other users by supplying different identity values
- Order records and business workflows may be manipulated
- The application may incur unauthorized financial or inventory impact
- Downstream customer or operational data could be exposed or corrupted
General mitigation guidance
Mitigation generally focuses on enforcing authentication and authorization at the server-side operation boundary.
Common defensive patterns include:
- Deriving the acting user from a verified session or token rather than a client-supplied
userId - Requiring authentication before processing order creation
- Enforcing object-level authorization for every order-related operation
- Treating identity and ownership fields from requests as untrusted
- Applying least privilege to service accounts and database operations
- Rejecting requests when identity context is missing, inconsistent, or cannot be verified
How teams detect issues like this
Organizations can identify similar issues through:
- Static analysis rules that flag sensitive endpoints accepting user identifiers directly from request parameters
- Code review checks for authentication and authorization before business-critical operations
- API policy enforcement requiring authenticated identity context for order creation
- Integration tests that verify unauthenticated and cross-user requests are rejected
- Audit-log analysis for orders created without a corresponding authenticated principal or with inconsistent identity attributes
Automated security review tools may help identify trust-boundary violations, but findings should be validated against the application's authentication model.

