Critical severityOSV Advisory· Published Dec 18, 2025· Updated Feb 6, 2026
Weblate has git config file overwrite vulnerability that leads to remote code execution
CVE-2025-68398
Description
Weblate is a web based localization tool. In versions prior to 5.15.1, it was possible to overwrite Git configuration remotely and override some of its behavior. Version 5.15.1 fixes the issue.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
WeblatePyPI | < 5.15.1 | 5.15.1 |
Affected products
1- Range: weblate-0.1, weblate-0.2, weblate-0.3, …
Patches
2dd8c9d7b00eefix(vcs): use GIT_SSH_COMMAND to override ssh command
1 file changed · +1 −1
weblate/vcs/base.py+1 −1 modified@@ -190,7 +190,7 @@ def _getenv(environment: dict[str, str] | None = None) -> dict[str, str]: # Avoid Git traversing outside the data dir "GIT_CEILING_DIRECTORIES": data_path("vcs").as_posix(), # Use ssh wrapper - "GIT_SSH": SSH_WRAPPER.filename.as_posix(), + "GIT_SSH_COMMAND": SSH_WRAPPER.filename.as_posix(), "SVN_SSH": SSH_WRAPPER.filename.as_posix(), } if environment:
4837a4154390fix(validators): reject certain paths from being used
4 files changed · +16 −3
weblate/trans/backups.py+1 −1 modified@@ -550,7 +550,7 @@ def validate(self) -> None: self.load_memory(zipfile) self.load_components(zipfile) for name in zipfile.namelist(): - validate_filename(name) + validate_filename(name, check_prohibited=False) def restore_unit( self,
weblate/utils/files.py+1 −1 modified@@ -90,7 +90,7 @@ def should_skip(location): ) -def is_excluded(path): +def is_excluded(path: str) -> bool: """Whether path should be excluded from zip extraction.""" return any(exclude in f"/{path}/" for exclude in PATH_EXCLUDES) or ".." in path
weblate/utils/tests/test_validators.py+10 −0 modified@@ -139,6 +139,16 @@ def test_simplification(self) -> None: def test_empty(self) -> None: validate_filename("") + def test_prohibited(self) -> None: + with self.assertRaises(ValidationError): + validate_filename(".git/config") + validate_filename(".git/config", check_prohibited=False) + + def test_prohibited_subdir(self) -> None: + with self.assertRaises(ValidationError): + validate_filename("path/.git/config") + validate_filename("path/.git/config", check_prohibited=False) + class RegexTest(SimpleTestCase): def test_empty(self) -> None:
weblate/utils/validators.py+4 −1 modified@@ -33,6 +33,7 @@ from weblate.trans.util import cleanup_path from weblate.utils.const import WEBHOOKS_SECRET_PREFIX from weblate.utils.data import data_dir +from weblate.utils.files import is_excluded USERNAME_MATCHER = re.compile(r"^[\w@+-][\w.@+-]*$") @@ -238,7 +239,7 @@ def validate_plural_formula(value) -> None: ) from error -def validate_filename(value) -> None: +def validate_filename(value: str, *, check_prohibited: bool = True) -> None: if "../" in value or "..\\" in value: raise ValidationError( gettext("The filename can not contain reference to a parent directory.") @@ -254,6 +255,8 @@ def validate_filename(value) -> None: "Maybe you want to use: {}" ).format(cleaned) ) + if check_prohibited and is_excluded(cleaned): + raise ValidationError(gettext("The filename contains a prohibited folder.")) def validate_backup_path(value: str) -> None:
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
8- github.com/advisories/GHSA-8vcg-cfxj-p5m3ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-68398ghsaADVISORY
- github.com/WeblateOrg/weblate/commit/4837a4154390f7c1d03c0e398aa6439dcfa361b4ghsax_refsource_MISCWEB
- github.com/WeblateOrg/weblate/commit/dd8c9d7b00eebe28770fa0e2cd96126791765ea7ghsax_refsource_MISCWEB
- github.com/WeblateOrg/weblate/pull/17330ghsax_refsource_MISCWEB
- github.com/WeblateOrg/weblate/pull/17345ghsax_refsource_MISCWEB
- github.com/WeblateOrg/weblate/releases/tag/weblate-5.15.1ghsax_refsource_MISCWEB
- github.com/WeblateOrg/weblate/security/advisories/GHSA-8vcg-cfxj-p5m3ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.