Vulnerabilities in pkg:pypi/lightgbm

PACKAGE
Advisory Identifier: GHSA-2586-f3p4-hq84
Advisory Summary

CVE-2024-43598 is a HIGH (CVSS 8.1) remote code execution vulnerability (CWE-122: Heap-based Buffer Overflow) affecting Lightgbm libraries in the PyPI ecosystem. The issue involves lightgbm remote code execution vulnerability. Remediation is available by upgrading affected packages to version 4.6.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/lightgbm

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-2586-f3p4-hq84 CVE-2024-43598 HIGH LightGBM Remote Code Execution Vulnerability

CVE-2024-43598 at a Glance

CVE Identifier CVE-2024-43598
GHSA Identifier GHSA-2586-f3p4-hq84
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-122: Heap-based Buffer Overflow
Affected Product Lightgbm
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.1

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

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
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-43598

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

lightgbm fixed: 4.6.0
pip install lightgbm>=4.6.0
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 lightgbm

How to Check if You Are Affected

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

pip show lightgbm

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-122: Heap-based Buffer Overflow, where a heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc(). In Lightgbm, 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

LightGBM Remote Code Execution Vulnerability

CVE-2024-43598 Affected Lightgbm Versions

1 component(s)
Fixed Versions:
4.6.0
Product / Package Ecosystem Affected Versions Fixed Version
lightgbm
PyPI
≥ 1.0.0
< 4.6.0
4.6.0

References

Frequently Asked Questions

What is CVE-2024-43598?
CVE-2024-43598 is a security vulnerability in Lightgbm involving LightGBM Remote Code Execution Vulnerability under CWE-122: Heap-based Buffer Overflow.
Which Lightgbm versions are affected?
Affected versions include releases prior to 4.6.0 across affected packages: lightgbm.
What version fixes CVE-2024-43598?
Upgrading to 4.6.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is lightgbm affected?
Yes, lightgbm is affected in releases prior to 4.6.0. Upgrade your dependency to 4.6.0 or later.
What is the CVSS score of CVE-2024-43598?
CVE-2024-43598 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C.
What CWE is associated with CVE-2024-43598?
CVE-2024-43598 is classified under CWE-122: Heap-based Buffer Overflow (A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().).
How can I check PyPI dependencies for CVE-2024-43598?
Run the dependency tree command: 'pip show lightgbm'. 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-2586-f3p4-hq84",
  "modified" : "2025-02-18T19:25:51Z",
  "published" : "2024-11-12T18:30:58Z",
  "aliases" : [ "CVE-2024-43598" ],
  "summary" : "LightGBM Remote Code Execution Vulnerability",
  "details" : "LightGBM Remote Code Execution Vulnerability",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "lightgbm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "4.6.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-43598"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/microsoft/LightGBM"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/lightgbm/PYSEC-2024-231.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-43598"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-122" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-02-18T19:25:51Z",
    "nvd_published_at" : "2024-11-12T18:15:28Z"
  }
}