Qiskit arbitrary code execution in QPY deserialization

Severity: low · CVSS 3.1 · Published 2025-03-14

Qiskit is an open-source quantum computing framework used by researchers and developers to design and simulate quantum circuits. A vulnerability in its QPY file deserialization allows attackers to execute arbitrary Python code by crafting a malicious QPY file, which could compromise any system using Qiskit to load untrusted quantum circuit files and lead to complete system takeover.

Technologies: qiskit (PyPI). Vendors: PyPI.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Low severity, with a CVSS score of 3.1, published 14 March 2025.
Which products and versions are affected?
qiskit (PyPI) ECOSYSTEM:introduced=0,last_affected=1.4.1.
Is there a fix for This vulnerability?
A patch was published on 2025-03-14: Fix available in Qiskit 1.4.2 and 2.0.0 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked over the network.
Am I affected?
Check whether you run qiskit (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

This is a deserialization vulnerability (CWE-502) in Qiskit's qiskit.qpy.load() function affecting QPY format versions prior to 13. When a Python process deserializes a specially crafted QPY binary file, arbitrary Python code embedded in the payload is executed without requiring privilege escalation or user interaction. The attack vector is network-accessible if QPY files are loaded from untrusted remote sources. Affected versions range from 0.18.0 through 1.4.1; users should upgrade to version 1.4.2 or 2.0.0 or later.

Affected products

  • IBM Qiskit 0.18.0 through 1.4.1

Timeline

  • 2025-03-14: disclosed
  • 2025-03-14: advisory: GHSA-3pwp-2fqj-6g2p marked as duplicate of GHSA-6m2c-76ff-6vrf and withdrawn
  • 2025-03-14: patched: Fix available in Qiskit 1.4.2 and 2.0.0

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.