Downloads · 30 days
0
Zhuxs/onnx-checker-overflow-poc
onnx-checker-overflow-poc is a machine learning model from Zhuxs. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Three validation bypass vulnerabilities in onnx.checker:
Downloads · 30 days
0
Access
Public
Updated May 15, 2026
Repo size
564 B
Likes
0
Public
Click a slice to open those files.
.py18.6 KB · 85%
From the Hugging Face model README
Three validation bypass vulnerabilities in onnx.checker:
checker.cc:129 — nelem *= x without overflow check. Tensor with dims=[2^31, 2^31] and 16 bytes raw_data passes check_tensor().
Checker accepts dims=[4, -1]. numpy_helper.to_array() silently produces shape (4, 4) instead of rejecting.
Checker accepts 100 dimensions. numpy_helper.to_array() crashes (numpy max = 64).
| File | Size | Vulnerability |
|---|---|---|
| poc_overflow.onnx | 113 B | Integer overflow checker bypass |
| poc_negative_dims.onnx | 161 B | Negative dimension injection |
| poc_highdim.onnx | 290 B | High dimensionality crash |
import onnx
from onnx import checker, numpy_helper
# All three pass checker but are malformed:
for f in ["poc_overflow.onnx", "poc_negative_dims.onnx", "poc_highdim.onnx"]:
model = onnx.load(f)
checker.check_model(model) # PASSES (bug)
MIT