Security Bulletin
Summary
The functions qiskit.qasm2.load and qiskit.qasm2.loads may recurse too deeply and overflow the available stack space, when encountering certain classical expressions.
Vulnerability Details
CVEID: CVE-2026-4870
DESCRIPTION: IBM Qiskit SDK could allow an attacker to trigger a segmentation fault leading to a denial of service due to uncontrolled recursion in the parser.
CVSS Source: IBM
CVSS Base score: 7.5
CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
Affected Products and Versions
| Affected Product(s) | Version(s) |
| Qiskit SDK |
0.43.0 - 2.5.0 |
Remediation/Fixes
Remediation/Fixes guidance:
The issue is addressed in Qiskit versions v1.4.6 and v2.4.2. These are patched to error with a Python-space RecursionError exception once the expression depth exceeds the Python recursion limit which can be queried with sys.getrecursionlimit(). This limit can be adjusted by calling sys.setrecursionlimit(). Future versions of Qiskit may remove this limit entirely with a non-recursive version of the OpenQASM 2 parser.
| Product(s) | Version(s) number and/or range | Remediation/Fix/Instructions |
| <Qiskit SDK - qiskit.qasm2.loads() function> | v1.4.6 and v2.4.2 |
Upgrade to the patched versions: qiskit v1.4.6 or qiskit v2.4.2. |
| <Qiskit SDK - QuantumCircuit.from_qasm_str function> | v1.4.6 and v2.4.2 |
Upgrade to the patched versions: qiskit v1.4.6 or qiskit v2.4.2. |
| <Qiskit SDK - QuantumCircuit.from_qasm_str function> | v1.4.6 and v2.4.2 |
Upgrade to the patched versions: qiskit v1.4.6 or qiskit v2.4.2. |
Workarounds and Mitigations
Workarounds/Mitigation guidance:
None
Get Notified about Future Security Bulletins
References
Reference guidance:
1. IBM strongly recommends upgrading Qiskit to v1.4.6 or v2.4.2
Acknowledgement
This vulnerability was reported to IBM by Ali Sherif.
Change History
12 Jun 2026: Initial Publication
*The CVSS Environment Score is customer environment specific and will ultimately impact the Overall CVSS Score. Customers can evaluate the impact of this vulnerability in their environments by accessing the links in the Reference section of this Security Bulletin.
Disclaimer
According to the Forum of Incident Response and Security Teams (FIRST), the Common Vulnerability Scoring System (CVSS) is an "industry open standard designed to convey vulnerability severity and help to determine urgency and priority of response." IBM PROVIDES THE CVSS SCORES ""AS IS"" WITHOUT WARRANTY OF ANY KIND, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. CUSTOMERS ARE RESPONSIBLE FOR ASSESSING THE IMPACT OF ANY ACTUAL OR POTENTIAL SECURITY VULNERABILITY. In addition to other efforts to address potential vulnerabilities, IBM periodically updates the record of components contained in our product offerings. As part of that effort, if IBM identifies previously unidentified packages in a product/service inventory, we address relevant vulnerabilities regardless of CVE date. Inclusion of an older CVEID does not demonstrate that the referenced product has been used by IBM since that date, nor that IBM was aware of a vulnerability as of that date. We are making clients aware of relevant vulnerabilities as we become aware of them. "Affected Products and Versions" referenced in IBM Security Bulletins are intended to be only products and versions that are supported by IBM and have not passed their end-of-support or warranty date. Thus, failure to reference unsupported or extended-support products and versions in this Security Bulletin does not constitute a determination by IBM that they are unaffected by the vulnerability. Reference to one or more unsupported versions in this Security Bulletin shall not create an obligation for IBM to provide fixes for any unsupported or extended-support products or versions.
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
12 June 2026
Initial Publish date:
12 June 2026
UID
ibm17276123