Intel

AIKIDO-2026-597441

qiskit is vulnerable to Denial of Service (DoS)

CVE-2026-4870Published Jul 6, 2026
July 6, 2026

75

CVE Score

High

Denial of Service (DoS)

Are you affected? Scan for Free

TL;DR

The OpenQASM 2 importer functions qiskit.qasm2.load and qiskit.qasm2.loads parse classical expressions with a recursive operator-precedence parser. When given a program containing deeply nested expressions, such as an arbitrarily long run of parentheses, the expression subparser recurses without bound and exhausts the native stack. This causes a stack-overflow segmentation fault that abruptly crashes the interpreter process, allowing a denial of service through crafted OpenQASM 2 input. The fix threads a recursion-depth limit derived from sys.getrecursionlimit() through the parser and raises a Python RecursionError before the stack is exhausted.

How do I fix this?

Upgrade the qiskit library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you parse untrusted OpenQASM 2 program text with qiskit.qasm2.load or qiskit.qasm2.loads.

Package

Versions

0.43.0 - 1.4.5

Fixed in 1.4.6

2.0.0 - 2.4.1

Fixed in 2.4.2

Background info

qiskit is vulnerable to Denial of Service (DoS) in versions 0.43.0 - 1.4.5 and 2.0.0 - 2.4.1.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea