GHSA-hfpv-mc5v-p9mm CVE-2025-66407 PYSEC-2025-231
Weblate has a Server-Side Request Forgery issue
- Severity
- 5.0 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.24%
- Chance of exploitation in the next 30 days. Higher than 15.15% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Fix
5.15- Upgrade weblate to this version or later
Description
Impact
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, 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.
Patches
This has been addressed in the Weblate 5.15 release.
Workarounds
Removing Mercurial from VCS_BACKENDS avoids this vulnerability, as 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.
References
Thanks to Jason Marcello for responsible disclosure.
Affected versions
PyPI
| Package | Vulnerable | Fixed in |
|---|---|---|
| weblate | < 5.15 |
5.15 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
weblate PyPI → 5.15
- pip
pip install --upgrade "weblate>=5.15"- poetry
poetry add "weblate>=5.15"- uv
uv add "weblate>=5.15"
Severity breakdown
CVSS 3.1 5.0
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Changed
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
Weakness
CWE-352: Cross-Site Request Forgery (CSRF)
The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.
How to prevent it
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. For example, use anti-CSRF packages such as the OWASP CSRFGuard. [REF-330] Another example is the ESAPI Session Management control, which includes a component for CSRF. [REF-45]
- Implementation: Ensure that the application is free of cross-site scripting issues (CWE-79), because most CSRF defenses can be bypassed using attacker-controlled script.
- Architecture and Design: Generate a unique nonce for each form, place the nonce into the form, and verify the nonce upon receipt of the form. Be sure that the nonce is not predictable (CWE-330). [REF-332]
- Architecture and Design: Identify especially dangerous operations. When the user performs a dangerous operation, send a separate confirmation request to ensure that the user intended to perform that operation.
- Architecture and Design: Use the "double-submitted cookie" method as described by Felten and Zeller: When a user visits a site, the site should generate a pseudorandom value and set it as a cookie on the user's machine. The site should require every form submission to include this value as a form value and also as a cookie value. When a POST request is sent to the site, the request should only be considered valid if the form value and the cookie value are the same. Because of the same-origin policy, an attacker cannot read or modify the value stored in the cookie. To successfully submit a form on behalf of the user, the attacker would have to correctly guess the pseudorandom value. If the pseudorandom value is cryptographically strong, this will be prohibitively difficult. This technique requires Javascript, so it may not work for browsers that have Javascript disabled. [REF-331]
- Architecture and Design: Do not use the GET method for any request that triggers a state change.
- Implementation: Check the HTTP Referer header to see if the request originated from an expected page. This could break legitimate functionality, because users or proxies may have disabled sending the Referer for privacy reasons.
CWE-918: Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-2q2q-jr9g-v9rf Weblate has IDOR in GroupViewSet that allows authenticated project manager to gain unauthorized read access to any private project | High | Also affects weblate |
| GHSA-2p9g-x3cv-5hh4 Private Weblate projects vulnerable to observable object existence disclosure via globally scoped object lookups | Medium | Also affects weblate |
| GHSA-vmfc-9982-2m45 Weblate SSRF: outbound URL guard misses some private ranges | Medium | Also affects weblate |
| GHSA-6wxc-8mgq-w26m Weblate: Stored HTML injection in editor search preview | Medium | Also affects weblate |
| GHSA-5cmv-3rc4-7279 Weblate vulnerable to XSS via crafted Markdown | Medium | Also affects weblate |
| GHSA-gcg5-86jr-f7jg Weblate Vulnerable to Private Translation Enumeration via Screenshot API | Medium | Also affects weblate |
| GHSA-cwcx-382v-8m9g Weblate Vulnerable to Authenticated SSRF via Project Backup Import bypassing validate_repo_url | High | Also affects weblate |
| GHSA-6j8j-4qp3-36p2 Weblate Doesn't Invalidate API Token on Password Change | Medium | Also affects weblate |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor