CVE-2022-23915: Weblate Improper Neutralization Of Special Elements Vulnerability

HIGH
Advisory Identifier: GHSA-3872-f48p-pxqj
CVSS 8.8
CWE-88 CWE-77
Published
Advisory Summary

CVE-2022-23915 is a HIGH (CVSS 8.8) improper neutralization of special elements vulnerability (CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')) affecting Weblate libraries in the PyPI ecosystem. The issue involves improper neutralization of special elements used in a command ('command injection') in weblate. Remediation is available by upgrading affected packages to version 4.11.1.

CVE-2022-23915 at a Glance

CVE Identifier CVE-2022-23915
GHSA Identifier GHSA-3872-f48p-pxqj
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
Affected Product Weblate
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.8

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

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

How to Fix CVE-2022-23915

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: 4.11.1
pip install Weblate>=4.11.1
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-2022-23915, 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 4.11.1), 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-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection'), where the product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string. 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 sanitize some arguments passed to Git and Mercurial, which allowed changing their behavior in an unintended way. ### Patches The issues were fixed in the 4.11.1 release. The following commits are addressing it: * 35d59f1f040541c358cece0a8d4a63183ca919b8 * d83672a3e7415da1490334e2c9431e5da1966842 ### Workarounds Instances in which untrusted users cannot create new components are not affected. ### References * [SNYK-PYTHON-WEBLATE-2414088](https://security.snyk.io/vuln/SNYK-PYTHON-WEBLATE-2414088) ### 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-2022-23915 Affected Weblate Versions

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

References

Frequently Asked Questions

What is CVE-2022-23915?
CVE-2022-23915 is a security vulnerability in Weblate involving Improper Neutralization of Special Elements used in a Command ('Command Injection') in Weblate under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection').
Which Weblate versions are affected?
Affected versions include releases prior to 4.11.1 across affected packages: Weblate.
What version fixes CVE-2022-23915?
Upgrading to 4.11.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Weblate affected?
Yes, Weblate is affected in releases prior to 4.11.1. Upgrade your dependency to 4.11.1 or later.
What is the CVSS score of CVE-2022-23915?
CVE-2022-23915 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-23915?
CVE-2022-23915 is classified under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (The product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string.).
How can I check PyPI dependencies for CVE-2022-23915?
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-3872-f48p-pxqj",
  "modified" : "2024-11-19T18:28:54Z",
  "published" : "2022-03-04T21:15:31Z",
  "aliases" : [ "CVE-2022-23915" ],
  "summary" : "Improper Neutralization of Special Elements used in a Command ('Command Injection') in Weblate",
  "details" : "### Impact\nWeblate didn't correctly sanitize some arguments passed to Git and Mercurial, which allowed changing their behavior in an unintended way.\n\n### Patches\n\nThe issues were fixed in the 4.11.1 release. The following commits are addressing it:\n\n* 35d59f1f040541c358cece0a8d4a63183ca919b8\n* d83672a3e7415da1490334e2c9431e5da1966842\n\n### Workarounds\n\nInstances in which untrusted users cannot create new components are not affected.\n\n### References\n* [SNYK-PYTHON-WEBLATE-2414088](https://security.snyk.io/vuln/SNYK-PYTHON-WEBLATE-2414088)\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:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Weblate"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.11.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/WeblateOrg/weblate/security/advisories/GHSA-3872-f48p-pxqj"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-23915"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WeblateOrg/weblate/pull/7337"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WeblateOrg/weblate/pull/7338"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WeblateOrg/weblate/commit/35d59f1f040541c358cece0a8d4a63183ca919b8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WeblateOrg/weblate/commit/d83672a3e7415da1490334e2c9431e5da1966842"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/WeblateOrg/weblate"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WeblateOrg/weblate/releases/tag/weblate-4.11.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/weblate/PYSEC-2022-162.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/weblate/PYSEC-2022-31.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://security.snyk.io/vuln/SNYK-PYTHON-WEBLATE-2414088"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-PYTHON-WEBLATE-2414088"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77", "CWE-88" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-03-04T21:15:31Z",
    "nvd_published_at" : "2022-03-04T20:15:00Z"
  }
}