CVE-2026-34445·Python vulnerability
Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. Prior to version 1.21.0, the ExternalDataInfo class in ONNX was using Python’s setattr() function to load metadata (like file paths or data lengths) directly from an ONNX model file. It didn’t check if the "keys" in the file were valid. Due to this, an attacker could craft a malicious model that overwrites internal object properties. This issue has been patched in version 1.21.0.
- Severity
- high
- Software
- Python
- Fixed in
- 1.21.0
- Published
- 2026-04-01
Affected versions
Until: 1.21.0
Fixed in: 1.21.0
How to fix this CVE
Update Python and the ONNX library to version 1.21.0 or later to remediate this vulnerability. The vulnerability allows attackers to craft malicious ONNX model files that can overwrite critical object properties through unchecked attribute assignment. Immediately patch all systems running Python with ONNX versions prior to 1.21.0, especially those processing untrusted ML models.
sudo dnf update python3 && pip3 install --upgrade onnx>=1.21.0Defensia detects this vulnerability
How to check if you are affected
- Check the ONNX package version: python3 -c "import onnx; print(onnx.__version__)" and verify it is 1.21.0 or higher
- Verify Python installations by running python3 --version and confirming no legacy ONNX installations exist in site-packages
- Search application logs for ExternalDataInfo class instantiation errors or AttributeError exceptions when loading model files
- Confirm remediation by re-running the version check command and validating no ONNX versions below 1.21.0 remain in pip freeze output
FAQ
What is CVE-2026-34445?
This vulnerability exists in ONNX's ExternalDataInfo class, which fails to validate attribute names when deserializing model metadata from files. An attacker can craft a malicious ONNX model that injects arbitrary attributes to overwrite internal object properties, potentially leading to code execution or denial of service.
Is CVE-2026-34445 being actively exploited?
No, this vulnerability is not currently listed on the CISA KEV catalog and no public exploits have been disclosed, though it remains a high-severity risk (CVSS 8.6) for systems processing untrusted ONNX models.
What versions of Python are affected by CVE-2026-34445?
All Python versions running ONNX prior to version 1.21.0 are affected. The vulnerability is in the ONNX library itself, not in Python core, so any Python 3.x deployment using vulnerable ONNX versions is at risk.
How do I check if my server is vulnerable to CVE-2026-34445?
Run 'python3 -c "import onnx; print(onnx.__version__)"' and compare the output against version 1.21.0. If the version is lower, the system is vulnerable.
Does Defensia detect CVE-2026-34445?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If ONNX is installed on a monitored server, CVE-2026-34445 will appear in your dashboard with remediation steps.
Related Python CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-34445. Free for 1 server.
Get started free