The vulnerability exists in the UserController::upsertUser method within src/Core/Framework/Api/Controller/UserController.php. The method uses Context::SYSTEM_SCOPE, which intentionally bypasses standard ACL permission checks. The flaw was the absence of a specific check to validate who is allowed to set the admin flag on a user account. As a result, any API user with the relatively low-level user:create or user:update permissions could create a new user with admin privileges or grant admin rights to an existing user by simply including "admin": true in the request body. This provides a direct path to privilege escalation. The patch, identified in commit 7f1cef324ca4edfa6369264cc1c41287d032624d, rectifies this by adding a condition that throws a PermissionDeniedException if a non-admin user attempts to set the admin field. Therefore, the function Shopware\Core\Framework\Api\Controller\UserController::upsertUser is the exact location of the vulnerability and would appear in any runtime trace of an exploit.