CVE-2024-7776: ONNX: path traversal in download_model enables RCE
GHSA-h36j-8vv3-cj52 HIGH CISA: ATTENDAny ML pipeline using onnx ≤1.16.1 to download models from untrusted sources is exposed to arbitrary file overwrite and potential RCE via malicious tar archives. Upgrade to onnx 1.17.0 immediately and audit all automated model-fetching workflows in your supply chain. Until patched, restrict model downloads to internal artifact registries with hash verification.
Risk Assessment
High risk for ML teams that pull ONNX models from public registries, HuggingFace, or third-party sources. CVSS 8.1 with no privileges required, though user interaction is needed to trigger a model download. EPSS at 1.47% indicates low current exploitation activity, but the underlying technique (tar slip / path traversal) is well-documented and weaponizable by moderately skilled attackers. AI/ML inference hosts are high-value targets: RCE in these environments exposes training data, model IP, credentials, and downstream production systems.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| onnx | pip | < 1.17.0 | 1.17.0 |
Do you use onnx? You're affected.
Severity & Risk
Attack Surface
Recommended Action
6 steps-
Patch: Upgrade onnx to ≥1.17.0 immediately — this is the only complete fix.
-
Audit: Identify all pipeline components calling download_model() or loading tar-packaged ONNX models from external sources.
-
Source control: Whitelist model origins and enforce SHA-256 checksum verification before extraction.
-
Sandbox: Run model loading processes in low-privilege, filesystem-restricted environments (containers with read-only mounts outside the model directory).
-
Detection: Alert on tar/zip extraction creating files outside expected model directories; monitor for unexpected writes to ~/.ssh/, cron paths, or Python site-packages post model-load.
-
SBOM
Ensure onnx version is tracked in your software bill of materials for all AI-enabled products.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2024-7776?
Any ML pipeline using onnx ≤1.16.1 to download models from untrusted sources is exposed to arbitrary file overwrite and potential RCE via malicious tar archives. Upgrade to onnx 1.17.0 immediately and audit all automated model-fetching workflows in your supply chain. Until patched, restrict model downloads to internal artifact registries with hash verification.
Is CVE-2024-7776 actively exploited?
No confirmed active exploitation of CVE-2024-7776 has been reported, but organizations should still patch proactively.
How to fix CVE-2024-7776?
1. Patch: Upgrade onnx to ≥1.17.0 immediately — this is the only complete fix. 2. Audit: Identify all pipeline components calling download_model() or loading tar-packaged ONNX models from external sources. 3. Source control: Whitelist model origins and enforce SHA-256 checksum verification before extraction. 4. Sandbox: Run model loading processes in low-privilege, filesystem-restricted environments (containers with read-only mounts outside the model directory). 5. Detection: Alert on tar/zip extraction creating files outside expected model directories; monitor for unexpected writes to ~/.ssh/, cron paths, or Python site-packages post model-load. 6. SBOM: Ensure onnx version is tracked in your software bill of materials for all AI-enabled products.
What systems are affected by CVE-2024-7776?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, ML development environments, CI/CD ML pipelines, automated model fetching workflows.
What is the CVSS score for CVE-2024-7776?
CVE-2024-7776 has a CVSS v3.1 base score of 8.1 (HIGH). The EPSS exploitation probability is 5.26%.
Technical Details
NVD Description
A vulnerability in the `download_model` function of the onnx/onnx framework, before and including version 1.16.1, allows for arbitrary file overwrite due to inadequate prevention of path traversal attacks in malicious tar files. This vulnerability can be exploited by an attacker to overwrite files in the user's directory, potentially leading to remote command execution.
Exploitation Scenario
An adversary publishes a poisoned ONNX model to a public hub (e.g., HuggingFace, a model registry, or a typosquatted pip package). The malicious model archive embeds path traversal payloads in tar headers — e.g., entries named ../../.ssh/authorized_keys or ../../etc/cron.d/backdoor. When a data scientist or an automated training pipeline calls download_model() with the attacker's URL, the archive extracts attacker-controlled content to arbitrary filesystem locations. The adversary overwrites SSH authorized_keys for persistent access, injects a malicious Python package in site-packages for RCE on next import, or plants a cron job for scheduled callback — all without any indication to the victim beyond a successful-looking model download.
Weaknesses (CWE)
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H References
- github.com/advisories/GHSA-h36j-8vv3-cj52
- github.com/onnx/onnx/commit/1b70f9b673259360b6a2339c4bd97db9ea6e552f
- github.com/onnx/onnx/pull/6222
- github.com/pypa/advisory-database/tree/main/vulns/onnx/PYSEC-2025-10.yaml
- huntr.com/bounties/a7a46cf6-1fa0-454b-988c-62d222e83f63
- nvd.nist.gov/vuln/detail/CVE-2024-7776
Timeline
Related Vulnerabilities
CVE-2026-28500 9.1 onnx: Integrity Verification bypass enables tampering
Same package: onnx CVE-2024-5187 8.8 ONNX: path traversal in model download enables RCE
Same package: onnx CVE-2026-34445 8.6 ONNX: property overwrite via crafted model file
Same package: onnx GHSA-q56x-g2fj-4rj6 7.1 onnx: TOCTOU symlink following enables arbitrary file write
Same package: onnx CVE-2026-34447 5.5 ONNX: symlink traversal reads host files via model loading
Same package: onnx
AI Threat Alert