---
id: "CVE-2026-116501"
page: "https://infrastack.ai/live/CVE-2026-116501"
kind: "vulnerability"
aliases: ["CVE-2026-116501"]
title: "Qiskit C API qk_circuit_inst_unitary() can write out of bounds; fixed in 2.6.2"
severity: "high"
cvss: 8.4
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "qiskit", "fixed": ["2.6.2"], "affected": ">= 2.4.0, <= 2.6.1", "ecosystem": "pip"}]
ecosystems: []
tags: ["c-api", "package", "python", "qiskit", "qpy", "quantum"]
not_affected_if: ["no-c-api-use", "trusted-qpy-only", "version-2.6.2-or-later", "version-outside-2.4.0-to-2.6.1"]
published_at: "2026-11-08T17:16:37+00:00"
first_seen_at: "2026-11-08T17:22:01+00:00"
updated_at: "2026-11-08T17:25:44+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116501", "first_seen_at": "2026-11-08T17:22:01+00:00"}, {"source": "analyst", "url": "https://github.com/Qiskit/qiskit/security/advisories/GHSA-5835-q8qp-whcc", "first_seen_at": "2026-11-08T17:25:44+00:00", "cites": ["https://github.com/Qiskit/qiskit/security/advisories/GHSA-5835-q8qp-whcc", "https://github.com/qiskit/qiskit/releases"]}]
exploit_sources: []
---

# Qiskit C API qk_circuit_inst_unitary() can write out of bounds; fixed in 2.6.2

Link for people: https://infrastack.ai/live/CVE-2026-116501 (this .md is for agents)

Qiskit 2.4.0 through 2.6.1: the C API function qk_circuit_inst_unitary() can write more data than documented if a logic fault leaves a circuit in an allowed but inconsistent state. Maintainers say this could potentially be triggered by loading a corrupted or maliciously constructed QPY file. Fixed in 2.6.2.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pip:qiskit affected >= 2.4.0, <= 2.6.1 fixed 2.6.2

## How to check

- Run `pip show qiskit`; versions >= 2.4.0 and <= 2.6.1 are affected, 2.6.2 is patched.
- Only code that calls the C API function qk_circuit_inst_unitary() is the named path; check whether you build C/C++ code against Qiskit's C API, and whether it loads QPY files from untrusted sources.

## Fix

Upgrade qiskit to 2.6.2 (pip install -U 'qiskit>=2.6.2')

## Timeline

- 2026-11-08T17:22:01+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116501
- 2026-11-08T17:25:44+00:00 analyst https://github.com/Qiskit/qiskit/security/advisories/GHSA-5835-q8qp-whcc — Read Qiskit GHSA-5835-q8qp-whcc (affected >=2.4.0,<=2.6.1, patched 2.6.2) and 2.6.2 release notes (#17418). Not exploited, no PoC seen. IBM bulletin page not fetched directly. Whether 2.4.x/2.5.x backports exist is unknown.

## Documents

- [advisory] GHSA-5835-q8qp-whcc: Out of bounds write on qk_circuit_inst_unitary() https://github.com/Qiskit/qiskit/security/advisories/GHSA-5835-q8qp-whcc
- [fix] Qiskit 2.6.2 release (Enforce buffer overwrite safety in qk_circuit_inst_unitary #17418) https://github.com/qiskit/qiskit/releases

## From the sources

IBM Qiskit SDK 2.4.0 through 2.6.1 could allow a local attacker to execute arbitrary code due to an out-of-bounds write caused by improper input validation when accessing a corrupted unitary matrix.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
