The vulnerability exists in the AddonViewSet API in Weblate. Specifically, the endpoint for listing addons did not have proper access control, causing it to leak the configuration of all addons to any authenticated user. The root cause was the use of a non-filtered queryset, Addon.objects.all(), in the AddonViewSet. When a user made a GET request to the /api/addons/ endpoint, the list method of the viewset would be called, which in turn used the overly permissive queryset, returning all addon objects.
The patch for this vulnerability, introduced in commit 3f58f9a4152bc0cbdd6eff5954f9c7bc4d9f0af9, addresses this by replacing the static queryset with a dynamic get_queryset method. This method checks the user's permissions and filters the addons, only returning those associated with projects the user has access to. The same commit also improves the perm_check method to handle different addon scopes correctly. A subsequent commit, 7802c9b121eb407c48d4adddd4f2458fb3efef0f, further tightens the permissions in get_queryset from allowed_projects to managed_projects, indicating that the initial fix was not restrictive enough. The key vulnerable functions are weblate.api.views.AddonViewSet.get_queryset (due to its absence and then permissive implementation) and weblate.api.views.AddonViewSet.perm_check (due to its insufficient checks).