The vulnerability is a Server-Side Request Forgery (SSRF) in Weblate's machine translation service configuration. A user with 'project.edit' permissions could configure a machine translation service to use a URL pointing to an internal network address. The application failed to validate whether the URL was targeting a public address.
The exploitation flow starts when a user submits a malicious URL through the ProjectMachinerySettings.machinery_settings API endpoint. The configuration is then validated by the BaseMachineryForm.clean method, which, prior to the patch, did not perform any checks to prevent SSRF. During validation, the application makes a request to the configured URL. If this request fails (e.g., due to an invalid protocol for an internal service), the BaseMachineTranslation.check_failure function would be invoked. This function would then leak up to 200 characters of the response from the internal service in the error message displayed to the user, confirming the SSRF and potentially exposing sensitive information.
The patch addresses this by introducing several layers of protection. It adds a new setting ALLOWED_MACHINERY_DOMAINS to allowlist trusted domains. The validation logic in weblate.utils.outbound now checks if a URL points to a public IP address. The ProjectMachinerySettings.machinery_settings endpoint now explicitly disallows private targets. Finally, the BaseMachineTranslation.check_failure method was updated to only include error details from trusted hosts, preventing the information leak.