kodareef5/onnx-redos-poc
0
ONNX ReDoS PoC (CWE-1333)
Vulnerability
The RegexFullMatch reference operator uses Python re.compile() on patterns from the ONNX model. Python's re engine is vulnerable to catastrophic backtracking. The ONNX spec mandates re2 (linear time), but the implementation uses re (exponential).
Reproduce
pip install onnx
python poc.pyPattern (a+)+b with input "aaa..." causes exponential CPU consumption.
