Vulnerabilities in pkg:pypi/weave

PACKAGE
Advisory Identifier: GHSA-r49h-6qxq-624f
Advisory Summary

CVE-2024-7340 is a HIGH (CVSS 8.8) weave server api vulnerable to vulnerability (CWE-20: Improper Input Validation) affecting Weave libraries in the PyPI ecosystem. The issue involves weave server api vulnerable to arbitrary file leak. Remediation is available by upgrading affected packages to version 0.50.8.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/weave

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/weave. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-r49h-6qxq-624f CVE-2024-7340 HIGH Weave server API vulnerable to arbitrary file leak

CVE-2024-7340 at a Glance

CVE Identifier CVE-2024-7340
GHSA Identifier GHSA-r49h-6qxq-624f
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-20: Improper Input Validation
Affected Product Weave
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-2024-7340

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

weave fixed: 0.50.8
pip install weave>=0.50.8
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 weave

How to Check if You Are Affected

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

pip show weave

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Weave, 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

The Weave server API allows remote users to fetch files from a specific directory, but due to a lack of input validation, it is possible to traverse and leak arbitrary files remotely. In various common scenarios, this allows a low-privileged user to assume the role of the server admin.

CVE-2024-7340 Affected Weave Versions

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

References

Frequently Asked Questions

What is CVE-2024-7340?
CVE-2024-7340 is a security vulnerability in Weave involving Weave server API vulnerable to arbitrary file leak under CWE-20: Improper Input Validation.
Which Weave versions are affected?
Affected versions include releases prior to 0.50.8 across affected packages: weave.
What version fixes CVE-2024-7340?
Upgrading to 0.50.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is weave affected?
Yes, weave is affected in releases prior to 0.50.8. Upgrade your dependency to 0.50.8 or later.
What is the CVSS score of CVE-2024-7340?
CVE-2024-7340 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-2024-7340?
CVE-2024-7340 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check PyPI dependencies for CVE-2024-7340?
Run the dependency tree command: 'pip show weave'. 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-r49h-6qxq-624f",
  "modified" : "2024-08-02T15:58:23Z",
  "published" : "2024-07-31T15:31:19Z",
  "aliases" : [ "CVE-2024-7340" ],
  "summary" : "Weave server API vulnerable to arbitrary file leak",
  "details" : "The Weave server API allows remote users to fetch files from a specific directory, but due to a lack of input validation, it is possible to traverse and leak arbitrary files remotely. In various common scenarios, this allows a low-privileged user to assume the role of the server admin.",
  "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:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "weave"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.50.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-7340"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wandb/weave/pull/1657"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wandb/weave/commit/f43d5fb75e0d52933a52ecd9a0ce2f9b082e6c9f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wandb/weave"
  }, {
    "type" : "WEB",
    "url" : "https://research.jfrog.com/vulnerabilities/wandb-weave-server-remote-arbitrary-file-leak-jfsa-2024-001039248"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-31T20:54:48Z",
    "nvd_published_at" : "2024-07-31T15:15:11Z"
  }
}