Vulnerabilities in pkg:pypi/qiskit-terra

PACKAGE
Advisory Identifier: GHSA-6m2c-76ff-6vrf
Advisory Summary

CVE-2025-2000 is a CRITICAL (CVSS 9.8) qiskit allows arbitrary code execution vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Qiskit terra libraries in the PyPI ecosystem. The issue involves qiskit allows arbitrary code execution decoding qpy format versions < 13. Remediation is available by upgrading affected packages to version 1.4.2, 2.0.0rc2.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/qiskit-terra

2 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-6m2c-76ff-6vrf CVE-2025-2000 CRITICAL Qiskit allows arbitrary code execution decoding QPY format versions < 13
GHSA-fpmr-m242-xm7x CVE-2025-1403 HIGH Malciously crafted QPY files can allows Remote Attackers to Cause Denial of Service in Qiskit

CVE-2025-2000 at a Glance

CVE Identifier CVE-2025-2000
GHSA Identifier GHSA-6m2c-76ff-6vrf
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Qiskit terra
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
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-2025-2000

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

qiskit-terra fixed: Latest secure release
pip install qiskit-terra>=Latest secure release
qiskit fixed: 1.4.2
pip install qiskit>=1.4.2
qiskit fixed: 2.0.0rc2
pip install qiskit>=2.0.0rc2
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 qiskit-terra

How to Check if You Are Affected

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

pip show qiskit-terra

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Qiskit terra, 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 A maliciously crafted QPY file can potentially execute arbitrary-code embedded in the payload without privilege escalation when deserializing QPY formats < 13. A python process calling Qiskit's `qiskit.qpy.load()` function could potentially execute any arbitrary Python code embedded in the correct place in the binary file as part of a specially constructed payload. ### Patches Fixed in Qiskit 1.4.2 and in Qiskit 2.0.0rc2

CVE-2025-2000 Affected Qiskit terra Versions

3 component(s)
Fixed Versions:
1.4.22.0.0rc2
Product / Package Ecosystem Affected Versions Fixed Version
qiskit-terra
PyPI
≥ 0.18.0
≤ 0.46.3
qiskit
PyPI
< 1.4.2
1.4.2
qiskit
PyPI
≥ 2.0.0rc1
< 2.0.0rc2
All 1 versions
2.0.0rc1
2.0.0rc2

References

Frequently Asked Questions

What is CVE-2025-2000?
CVE-2025-2000 is a security vulnerability in Qiskit terra involving Qiskit allows arbitrary code execution decoding QPY format versions < 13 under CWE-502: Deserialization of Untrusted Data.
Which Qiskit terra versions are affected?
Affected versions include releases prior to 1.4.2, 2.0.0rc2 across affected packages: qiskit-terra, qiskit.
What version fixes CVE-2025-2000?
Upgrading to 1.4.2, 2.0.0rc2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is qiskit-terra affected?
Yes, qiskit-terra is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is qiskit affected?
Yes, qiskit is affected in releases prior to 1.4.2, 2.0.0rc2. Upgrade your dependency to 1.4.2, 2.0.0rc2 or later.
What is the CVSS score of CVE-2025-2000?
CVE-2025-2000 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2025-2000?
CVE-2025-2000 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check PyPI dependencies for CVE-2025-2000?
Run the dependency tree command: 'pip show qiskit-terra'. 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-6m2c-76ff-6vrf",
  "modified" : "2025-05-02T21:58:50Z",
  "published" : "2025-03-14T19:56:14Z",
  "aliases" : [ "CVE-2025-2000" ],
  "summary" : "Qiskit allows arbitrary code execution decoding QPY format versions < 13",
  "details" : "### Impact\n\nA maliciously crafted QPY file can potentially execute arbitrary-code embedded in the payload without privilege escalation when deserializing QPY formats < 13. A python process calling Qiskit's `qiskit.qpy.load()` function could potentially execute any arbitrary Python code embedded in the correct place in the binary file as part of a specially constructed payload.\n\n### Patches\n\nFixed in Qiskit 1.4.2 and in Qiskit 2.0.0rc2",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "qiskit-terra"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.18.0"
      }, {
        "last_affected" : "0.46.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "qiskit"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.4.1"
    }
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "qiskit"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0rc1"
      }, {
        "fixed" : "2.0.0rc2"
      } ]
    } ],
    "versions" : [ "2.0.0rc1" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Qiskit/qiskit/security/advisories/GHSA-6m2c-76ff-6vrf"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-2000"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Qiskit/qiskit"
  }, {
    "type" : "WEB",
    "url" : "https://www.ibm.com/support/pages/node/7185949"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-14T19:56:14Z",
    "nvd_published_at" : null
  }
}