Low severityNVD Advisory· Published Jul 1, 2024· Updated Aug 2, 2024
Weblate vulnerabler to improper sanitization of project backups
CVE-2024-39303
Description
Weblate is a web based localization tool. Prior to version 5.6.2, Weblate didn't correctly validate filenames when restoring project backup. It may be possible to gain unauthorized access to files on the server using a crafted ZIP file. This issue has been addressed in Weblate 5.6.2. As a workaround, do not allow untrusted users to create projects.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
WeblatePyPI | >= 4.14, < 5.6.2 | 5.6.2 |
Affected products
1- Range: >= 4.14, < 5.6.2
Patches
1b6a7eace155ffix(backups): skip pontentially bogus files in backups
1 file changed · +5 −3
weblate/trans/backups.py+5 −3 modified@@ -601,9 +601,11 @@ def restore(self, project_name: str, project_slug: str, user, billing=None): # Extract VCS for name in zipfile.namelist(): if name.startswith(self.VCS_PREFIX): - targetpath = os.path.join( - project.full_path, name[self.VCS_PREFIX_LEN :] - ) + path = name[self.VCS_PREFIX_LEN :] + # Skip potentially dangerous paths + if path != os.path.normpath(path): + continue + targetpath = os.path.join(project.full_path, path) upperdirs = os.path.dirname(targetpath) if upperdirs and not os.path.exists(upperdirs): os.makedirs(upperdirs)
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4- github.com/advisories/GHSA-jfgp-674x-6q4pghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-39303ghsaADVISORY
- github.com/WeblateOrg/weblate/commit/b6a7eace155fa0feaf01b4ac36165a9c5e63bfddghsax_refsource_MISCWEB
- github.com/WeblateOrg/weblate/security/advisories/GHSA-jfgp-674x-6q4pghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.