Summary
A high-severity authorization flaw in hosp_order allows a remote attacker to manipulate the order ID supplied to the order-cancellation function. When authorization is not properly tied to the requested order, an attacker may cancel orders they are not permitted to manage.
Affected context
The vulnerability occurs in the Order Cancellation component, specifically in the
orderRecordsService.cancelOrder path of OrderController.java. It may affect
deployments using the referenced rolling-release code when the cancellation
endpoint accepts a user-controlled order ID without reliably verifying that the
requester is authorized to act on that order.
Exploit preconditions
- Attack surface: Remotely accessible order-cancellation functionality
- Required access: Ability to reach the cancellation endpoint, potentially with a valid account or session depending on deployment controls
- Trigger point: Processing of the order ID argument by
cancelOrder - Why exploitation is possible: Authorization may be evaluated without binding the requested record to the caller's permitted scope, allowing a modified identifier to reference another order
Why this happens
The underlying bug is an object-level authorization failure involving a
user-controlled record identifier. The application appears to process the
selected order based on the supplied ID without consistently confirming that
the requester has permission to cancel that specific record. This maps most
directly to CWE-639: Authorization Bypass Through User-Controlled Key and
is also related to CWE-285: Improper Authorization.
Potential impact
- An attacker may cancel orders belonging to other users or business units.
- Order fulfillment, customer service, or inventory workflows could be disrupted.
- The application may expose unauthorized changes to order state.
- Business records and operational reporting could become inconsistent.
General mitigation guidance
Mitigation generally focuses on enforcing object-level authorization at the
service layer rather than trusting identifiers supplied by clients.
Common defensive patterns include:
- Checking ownership, tenant membership, role, and workflow permissions for every cancellation request.
- Resolving records through an authorization-scoped query instead of fetching by an unrestricted identifier.
- Applying deny-by-default policies and least privilege to order-management operations.
- Treating client-supplied IDs as untrusted references and validating them against the authenticated principal.
- Returning consistent authorization failures without revealing whether unrelated records exist.
- Using transaction and workflow controls to prevent unauthorized state transitions.
How teams detect issues like this
Detection approaches may include:
- Static analysis rules that identify controller or service methods using request-provided IDs in data-access operations without adjacent authorization checks.
- Code review checks for missing ownership, tenant, role, or relationship validation before state-changing actions.
- Dynamic tests that attempt to access and cancel records across user, tenant, and role boundaries.
- Policy enforcement requiring object-level authorization for endpoints that modify or delete records.
- Audit monitoring for repeated cancellation attempts involving unrelated or sequential identifiers.

