The vulnerability is a Server-Side Request Forgery (SSRF) in the Weblate webhook add-on. The analysis of the provided patch reveals that the root cause was the use of an unprotected fetch_url() function when sending webhook notifications. The patch addresses this by replacing fetch_url with fetch_validated_url within the weblate.addons.webhooks.WebhookBase.send_message function. This change introduces necessary security checks to prevent requests to internal or non-public IP addresses.
The vulnerable function is WebhookBase.send_message because it is the exact location in the code where the outbound HTTP request is made using the user-provided webhook URL. During an exploit, this function would be present in the stack trace as it executes the malicious request. The patch also adds validation at the form level (BaseWebhooksAddonForm.clean_webhook_url) to prevent saving malicious URLs, but the actual SSRF is triggered within send_message.