# CVE-2024-29032: `qiskit_ibm_runtime.RuntimeDecoder` can execute arbitrary code

> Attackers can execute arbitrary code by providing malicious JSON input to the RuntimeDecoder in the Qiskit IBM Runtime library.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 20 Mar 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-x4x5-jv3x-9c7m, PYSEC-2026-1858

## What is CVE-2024-29032?

CVE-2024-29032 is a medium-severity unsafe deserialization vulnerability in qiskit-ibm-runtime, published on 20 Mar 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Qiskit IBM Runtime is an environment that streamlines quantum computations and provides optimal implementations of the Qiskit quantum computing SDK. Starting in version 0.1.0 and prior to version 0.21.2, deserializing json data using `qiskit_ibm_runtime.RuntimeDecoder` can lead to arbitrary code execution given a correctly formatted input string. Version 0.21.2 contains a fix for this issue.

Weakness: CWE-502 (Deserialization of Untrusted Data)

## Which versions are affected by CVE-2024-29032?

3 open source packages ship an affected version, including qiskit-ibm-runtime. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `qiskit-ibm-runtime` | PyPI | From 0.1.0 | 0.21.2 |
| `qiskit-ibm-runtime` | PyPI | From 0.1.0 | 0.21.2 |
| `qiskit-ibm-runtime` | PyPI | From 0.1.0 | 0.21.2 |

Products: Ibm Qiskit Ibm Runtime.

## How do I fix CVE-2024-29032?

Upgrade qiskit-ibm-runtime to 0.21.2 or later.

## Is CVE-2024-29032 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-29032 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-29032 and fix it if it is affected.

What it is: CVE-2024-29032 is a medium-severity unsafe deserialization vulnerability in qiskit-ibm-runtime, published on 20 Mar 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-29032 exists.

Affected packages and fixed versions:
- qiskit-ibm-runtime (PyPI): affected from 0.1.0; fixed in 0.21.2
- qiskit-ibm-runtime (PyPI): affected from 0.1.0; fixed in 0.21.2
- qiskit-ibm-runtime (PyPI): affected from 0.1.0; fixed in 0.21.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-29032/ (Markdown: https://insights.sbomify.com/CVE-2024-29032/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-29032
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-29032
- OSV: https://osv.dev/vulnerability/CVE-2024-29032

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-29032/
Summaries are generated and may contain mistakes; the official description above is the record.
