PythonSeverity: MediumStatus: Published
DD package Python bindings do not check widths in matrix_kronecker, trace, and partial_trace
The DD package’s Python bindings matrix_kronecker, trace and partial_trace handed caller-supplied widths to the C++ package without comparing them to the package capacity or to the matrix DD’s level count (CWE-787). A Kronecker shift that puts the top operand at or above capacity indexes the unique tables out of bounds. A trace or partial_trace width shorter than the matrix’s level count reads past the eliminatedBelow vector. The sibling bindings from_matrix and get_matrix already reject a bad width with ValueError. The pip package mqt-core is affected from 4.0.0 up to, but not including, 4.3.0. Fixed in 4.3.0. The repository was formerly cda-tum/mqt-core. GitHub rates it moderate. The advisory credits ucsurf as reporter. Found by reading the source. Nothing was compiled or run.
Impact
The DD package’s Python bindings matrix_kronecker, trace and partial_trace handed caller-supplied widths to the C++ package without comparing them to the package capacity or to the matrix DD’s level count (CWE-787). A Kronecker shift that puts the top operand at or above capacity indexes the unique tables out of bounds. A trace or partial_trace width shorter than the matrix’s level count reads past the eliminatedBelow vector. The sibling bindings from_matrix and get_matrix already reject a bad width with ValueError.
Affected versions and fix
The pip package mqt-core is affected from 4.0.0 up to, but not including, 4.3.0. The patched release is 4.3.0. The repository was formerly cda-tum/mqt-core.
The published advisory is GHSA-9945-prhj-jmg5. GitHub rates it moderate. The advisory was published on 2026-12-04. The advisory credits ucsurf as reporter.
Found by reading the source. Nothing was compiled or run.
Timeline
- Found
- Advisory published
- Entry last updated
Machine-readable: JSON · Markdown · ID security/python/munich-quantum-toolkit__core/2026-12-04-dd-bindings-unchecked-widths
If this work is useful to you, you can support it on Buy Me a Coffee.