CVE-2025-15504: Lief LIEF Is Vulnerable To Segmentation Vulnerability

LOW
Advisory Identifier: GHSA-mjjp-xjfg-97wg
CVSS 3.3
CWE-404 CWE-476
Published
Advisory Summary

CVE-2025-15504 is a LOW (CVSS 3.3) lief is vulnerable to segmentation vulnerability (CWE-404: Improper Resource Shutdown or Release) affecting Lief libraries in the PyPI ecosystem. The issue involves lief is vulnerable to segmentation fault. Remediation is available by upgrading affected packages to version 0.17.2.

CVE-2025-15504 at a Glance

CVE Identifier CVE-2025-15504
GHSA Identifier GHSA-mjjp-xjfg-97wg
Severity LOW
CVSS v3.1 Base Score 3.3
CWE Classification CWE-404: Improper Resource Shutdown or Release
Affected Product Lief
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 3.3

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:N/S:U/C:N/I:N/A:L).

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

How to Fix CVE-2025-15504

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.17.2
pip install lief>=0.17.2
lief fixed: 0.17.2
Upgrade lief to 0.17.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 lief

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-15504, 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.17.2), 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-404: Improper Resource Shutdown or Release, where the product does not release or incorrectly releases a resource before it is made available for re-use. 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

A security flaw has been discovered in lief-project LIEF up to 0.17.1. Affected by this issue is the function Parser::parse_binary of the file src/ELF/Parser.tcc of the component ELF Binary Parser. The manipulation results in null pointer dereference. The attack must be initiated from a local position. The exploit has been released to the public and may be used for attacks. Upgrading to version 0.17.2 can resolve this issue. The patch is identified as 81bd5d7ea0c390563f1c4c017c9019d154802978. It is recommended to upgrade the affected component.

CVE-2025-15504 Affected Lief Versions

2 component(s)
Fixed Versions:
0.17.2
Product / Package Ecosystem Affected Versions Fixed Version
lief
PyPI
< 0.17.2
0.17.2
lief
crates.io
< 0.17.2
0.17.2

References

Frequently Asked Questions

What is CVE-2025-15504?
CVE-2025-15504 is a security vulnerability in Lief involving LIEF is vulnerable to segmentation fault under CWE-404: Improper Resource Shutdown or Release.
Which Lief versions are affected?
Affected versions include releases prior to 0.17.2 across affected packages: lief.
What version fixes CVE-2025-15504?
Upgrading to 0.17.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is lief affected?
Yes, lief is affected in releases prior to 0.17.2. Upgrade your dependency to 0.17.2 or later.
What is the CVSS score of CVE-2025-15504?
CVE-2025-15504 has a CVSS v3.1 base score of 3.3 (LOW) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2025-15504?
CVE-2025-15504 is classified under CWE-404: Improper Resource Shutdown or Release (The product does not release or incorrectly releases a resource before it is made available for re-use.).
How can I check PyPI dependencies for CVE-2025-15504?
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-mjjp-xjfg-97wg",
  "modified" : "2026-02-23T22:38:58Z",
  "published" : "2026-01-10T12:30:16Z",
  "aliases" : [ "CVE-2025-15504" ],
  "summary" : "LIEF is vulnerable to segmentation fault",
  "details" : "A security flaw has been discovered in lief-project LIEF up to 0.17.1. Affected by this issue is the function Parser::parse_binary of the file src/ELF/Parser.tcc of the component ELF Binary Parser. The manipulation results in null pointer dereference. The attack must be initiated from a local position. The exploit has been released to the public and may be used for attacks. Upgrading to version 0.17.2 can resolve this issue. The patch is identified as 81bd5d7ea0c390563f1c4c017c9019d154802978. It is recommended to upgrade the affected component.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "lief"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.17.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "lief"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.17.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-15504"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lief-project/LIEF/issues/1277"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lief-project/LIEF/issues/1277#issuecomment-3693859001"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lief-project/LIEF/commit/81bd5d7ea0c390563f1c4c017c9019d154802978"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/lief-project/LIEF"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lief-project/LIEF/releases/tag/0.17.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/oneafter/1210/blob/main/segv1"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?ctiid.340375"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.340375"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?submit.733329"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-404", "CWE-476" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-13T18:31:53Z",
    "nvd_published_at" : "2026-01-10T12:15:49Z"
  }
}