The vulnerability is an Insecure Direct Object Reference (IDOR) within Liferay Portal's commerce module, specifically affecting how notes on orders are handled in a multi-tenant setup. Authenticated users from one virtual instance could perform actions (add, delete, view, update) on order notes belonging to a different virtual instance.
The root cause of this vulnerability was the improper use of permission checks within the com.liferay.commerce.service.impl.CommerceOrderNoteServiceImpl class. Several methods in this service, such as addCommerceOrderNote, deleteCommerceOrderNote, and getCommerceOrderNotes, relied on _portletResourcePermission.check. This permission check was not sufficient as it failed to validate that the commerceOrderId being acted upon belonged to the same virtual instance as the user making the request. This allowed a malicious user to craft a request with a commerceOrderId from a different tenant and bypass the intended security boundaries.
The security patch, primarily in commit 9fad6a23b3c04146ef80a59b056f24b17cc2e721, addresses this flaw by systematically replacing the weak _portletResourcePermission.check with the more robust _commerceOrderModelResourcePermission.check. This corrected check properly validates permissions at the model level, ensuring that the user has the explicit right to access the specific CommerceOrder entity, thereby closing the IDOR gap. During an exploit, a runtime profiler would capture calls to these methods within CommerceOrderNoteServiceImpl as they are the direct entry points for the vulnerable operations.