Skip to content
OpenAdvisories
Medium · 6.1 CVE-2026-55093 EUVD-2026-77792GHSA-x5mv-8wgw-29hgRUSTSEC-2026-0217

tract-nnef: integer overflow in NNEF `.dat` tensor parser yields an out-of-bounds read on model load

Published Sep 14, 2026 · Updated Sep 14, 2026 · Assigned by GitHub_M

Description

Tract is a tiny, no-nonsense, self-contained TensorFlow and ONNX inference toolkit. Prior to 0.21.16, 0.22.2, and 0.23.1, tract-nnef uses unchecked usize multiplication in nnef/src/tensors.rs read_tensor for attacker-controlled tensor dimensions, the allocation size, and the reported tensor length. Loading a crafted NNEF archive through model_for_path or model_for_read reaches the default DatLoader and can make the wrapped size check accept a small allocation while data/src/tensor.rs as_slice_unchecked creates a much larger logical slice. Model construction through as_uniform can then read beyond the heap allocation and disclose adjacent data, and later access can terminate the process with a segmentation fault. The affected dense numeric tensor path does not include the independently guarded bool, String, or block-quant paths, and no out-of-bounds write or code execution was demonstrated. This issue is fixed in versions 0.21.16, 0.22.2, and 0.23.1.

Affected products

VendorProductAffectedFixed
sonos tract < 0.21.16, >= 0.22.0, < 0.22.2, >= 0.23.0, < 0.23.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling ascan 2.3.0-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io tract-nnef >= 0.23.0, < 0.23.1 0.23.1 GHSA-x5mv-8wgw-29hg
crates.io tract-nnef >= 0.22.0, < 0.22.2 0.22.2 GHSA-x5mv-8wgw-29hg
crates.io tract-nnef < 0.21.16 0.21.16 GHSA-x5mv-8wgw-29hg
crates.io tract-nnef >= 0.0.0-0, < 0.21.16 · >= 0.22.0, < 0.22.2 · >= 0.23.0, < 0.23.1 0.21.16, 0.22.2, 0.23.1 RUSTSEC-2026-0217

References