CVE-2024-39303: Weblate Weblate Vulnerable To Improper Sanitization Vulnerability

LOW
Advisory Identifier: GHSA-jfgp-674x-6q4p
CVSS 4.4
CWE-73
Published
Advisory Summary

CVE-2024-39303 is a LOW (CVSS 4.4) weblate vulnerable to improper sanitization vulnerability (CWE-73: External Control of File Name or Path) affecting Weblate libraries in the PyPI ecosystem. The issue involves weblate vulnerable to improper sanitization of project backups. Remediation is available by upgrading affected packages to version 5.6.2.

CVE-2024-39303 at a Glance

CVE Identifier CVE-2024-39303
GHSA Identifier GHSA-jfgp-674x-6q4p
Severity LOW
CVSS v3.1 Base Score 4.4
CWE Classification CWE-73: External Control of File Name or Path
Affected Product Weblate
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2024-39303

To remediate this vulnerability, upgrade all affected Weblate dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Weblate fixed: 5.6.2
pip install Weblate>=5.6.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show Weblate

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-39303, inspect your installed packages using pip:

pip show Weblate

Analyze the terminal output to locate any version of Weblate in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.6.2), your application is affected.

Note: The pip show Weblate command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-73: External Control of File Name or Path, where the product allows user input to control or influence paths or file names that are used in filesystem operations. In Weblate, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact 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. ### Patches This issue has been addressed in Weblate 5.6.2 via https://github.com/WeblateOrg/weblate/commit/b6a7eace155fa0feaf01b4ac36165a9c5e63bfdd. ### Workarounds Do not allow project creation to untrusted users. ### References Thanks to Bryan Cahill for bringing this issue to our attention. ### For more information If you have any questions or comments about this advisory: * Open a topic in [discussions](https://github.com/WeblateOrg/weblate/discussions) * Email us at [care@weblate.org](mailto:care@weblate.org)

CVE-2024-39303 Affected Weblate Versions

1 component(s)
Fixed Versions:
5.6.2
Product / Package Ecosystem Affected Versions Fixed Version
Weblate
PyPI
≥ 4.14
< 5.6.2
5.6.2

References

Frequently Asked Questions

What is CVE-2024-39303?
CVE-2024-39303 is a security vulnerability in Weblate involving Weblate vulnerable to improper sanitization of project backups under CWE-73: External Control of File Name or Path.
Which Weblate versions are affected?
Affected versions include releases prior to 5.6.2 across affected packages: Weblate.
What version fixes CVE-2024-39303?
Upgrading to 5.6.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Weblate affected?
Yes, Weblate is affected in releases prior to 5.6.2. Upgrade your dependency to 5.6.2 or later.
What is the CVSS score of CVE-2024-39303?
CVE-2024-39303 has a CVSS v3.1 base score of 4.4 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2024-39303?
CVE-2024-39303 is classified under CWE-73: External Control of File Name or Path (The product allows user input to control or influence paths or file names that are used in filesystem operations.).
How can I check PyPI dependencies for CVE-2024-39303?
Run the dependency tree command: 'pip show Weblate'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jfgp-674x-6q4p",
  "modified" : "2024-11-18T16:26:48Z",
  "published" : "2024-07-01T21:02:30Z",
  "aliases" : [ "CVE-2024-39303" ],
  "summary" : "Weblate vulnerable to improper sanitization of project backups",
  "details" : "### Impact\nWeblate didn't correctly validate filenames when restoring project backup. It may be possible to gain unauthorized access to\nfiles on the server using a crafted ZIP file.\n\n### Patches\nThis issue has been addressed in Weblate 5.6.2 via https://github.com/WeblateOrg/weblate/commit/b6a7eace155fa0feaf01b4ac36165a9c5e63bfdd.\n\n### Workarounds\nDo not allow project creation to untrusted users.\n\n### References\nThanks to Bryan Cahill for bringing this issue to our attention.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open a topic in [discussions](https://github.com/WeblateOrg/weblate/discussions)\n* Email us at [care@weblate.org](mailto:care@weblate.org)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Weblate"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.14"
      }, {
        "fixed" : "5.6.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/WeblateOrg/weblate/security/advisories/GHSA-jfgp-674x-6q4p"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-39303"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WeblateOrg/weblate/commit/b6a7eace155fa0feaf01b4ac36165a9c5e63bfdd"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/WeblateOrg/weblate"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-73" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-01T21:02:30Z",
    "nvd_published_at" : "2024-07-01T19:15:05Z"
  }
}