Vulnerabilities in pkg:pypi/lief

PACKAGE
Advisory Identifier: GHSA-377p-g8gr-5wpg
Advisory Summary

CVE-2024-31636 is a LOW (CVSS 3.9) lief obtain sensitive information vulnerability (CWE-457: Use of Uninitialized Variable) affecting Lief libraries in the PyPI ecosystem. The issue involves lief obtain sensitive information via the name parameter. Remediation is available by upgrading affected packages to version 0.15.0.

10 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/lief

10 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-377p-g8gr-5wpg CVE-2024-31636 LOW LIEF obtain sensitive information via the name parameter
GHSA-mjjp-xjfg-97wg CVE-2025-15504 LOW LIEF is vulnerable to segmentation fault
GHSA-jvp9-phwp-p738 CVE-2022-43171 HIGH LIEF heap buffer overflow in the LIEF::MachO::BinaryParser::parse_dyldinfo_generic_bind
GHSA-38hf-c37x-32hv CVE-2022-40922 HIGH LIEF vulnerable to denial of service through segmentation fault
GHSA-rm2x-hgr8-w343 CVE-2022-40923 MODERATE LIEF vulnerable to denial of service through segmentation fault
GHSA-22x7-vwh9-5w4g CVE-2021-32297 HIGH LIEF heap-buffer-overflow
GHSA-52xx-r3g2-p8jm CVE-2022-38306 MODERATE LIEF vulnerable to heap based buffer overflow
GHSA-2p5h-hpj4-fxgg CVE-2022-38497 MODERATE LIEF contains a segmentation violation
GHSA-x2xx-jw5m-5j86 CVE-2022-38307 MODERATE LIEF contains segmentation violation
GHSA-42vg-2q93-fj6j CVE-2022-38495 HIGH LIEF vulnerable to heap based buffer overflow via print_binary function

CVE-2024-31636 at a Glance

CVE Identifier CVE-2024-31636
GHSA Identifier GHSA-377p-g8gr-5wpg
Severity LOW
CVSS v3.1 Base Score 3.9
CWE Classification CWE-457: Use of Uninitialized Variable
Affected Product Lief
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 3.9

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

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

How to Fix CVE-2024-31636

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

lief fixed: 0.15.0
pip install lief>=0.15.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 lief

How to Check if You Are Affected

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

pip show lief

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-457: Use of Uninitialized Variable, where the code uses a variable that has not been initialized, leading to unpredictable or unintended results. In Lief, 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

An issue in LIEF v.0.14.1 allows a local attacker to obtain sensitive information via the name parameter of the machd_reader.c component.

CVE-2024-31636 Affected Lief Versions

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

References

Frequently Asked Questions

What is CVE-2024-31636?
CVE-2024-31636 is a security vulnerability in Lief involving LIEF obtain sensitive information via the name parameter under CWE-457: Use of Uninitialized Variable.
Which Lief versions are affected?
Affected versions include releases prior to 0.15.0 across affected packages: lief.
What version fixes CVE-2024-31636?
Upgrading to 0.15.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is lief affected?
Yes, lief is affected in releases prior to 0.15.0. Upgrade your dependency to 0.15.0 or later.
What is the CVSS score of CVE-2024-31636?
CVE-2024-31636 has a CVSS v3.1 base score of 3.9 (LOW) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2024-31636?
CVE-2024-31636 is classified under CWE-457: Use of Uninitialized Variable (The code uses a variable that has not been initialized, leading to unpredictable or unintended results.).
How can I check PyPI dependencies for CVE-2024-31636?
Run the dependency tree command: 'pip show lief'. 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-377p-g8gr-5wpg",
  "modified" : "2026-06-06T00:28:36Z",
  "published" : "2024-05-03T18:30:37Z",
  "aliases" : [ "CVE-2024-31636" ],
  "summary" : "LIEF obtain sensitive information via the name parameter",
  "details" : "An issue in LIEF v.0.14.1 allows a local attacker to obtain sensitive information via the name parameter of the machd_reader.c component.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "lief"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.15.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-31636"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lief-project/LIEF/issues/1038"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lief-project/LIEF/commit/307e113f8e00b034f0a5f1baa33e54d636c52ea3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/lief-project/LIEF"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/lief/PYSEC-2024-280.yaml"
  }, {
    "type" : "WEB",
    "url" : "http://lief.com"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-457" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-22T20:26:56Z",
    "nvd_published_at" : "2024-05-03T17:15:07Z"
  }
}