Quick answers
- Is CVE-2024-5187 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2024-5187 being exploited in the wild.
- How severe is CVE-2024-5187?
- High severity, with a CVSS score of 8.8, published 6 June 2024.
- Which products and versions are affected?
- onnx (PyPI) < 1.16.2, ECOSYSTEM:introduced=0,fixed=1.16.2, ECOSYSTEM:introduced=0,last_affected=1.17.0.
- Is there a fix for CVE-2024-5187?
- Yes. onnx (PyPI): upgrade to 1.16.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2024-5187 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2024-5187?
- Check whether you run onnx (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- onnx (PyPI): upgrade to 1.16.2 or later
pip install "onnx>=1.16.2"
Technical details
A path traversal vulnerability (CWE-22) exists in the `download_model_with_test_data` function of the ONNX framework. The root cause is the lack of validation for file paths contained within tar archives during extraction. An attacker can craft a malicious tar file containing absolute paths or parent directory references (e.g., `../../`) to overwrite arbitrary files on the host system. This can be leveraged for remote code execution (e.g., by overwriting `.ssh/authorized_keys`) or denial of service. Exploitation requires a user to download a malicious model using the affected function. The issue is resolved in version 1.16.2.
Affected products
- onnx onnx < 1.16.2
Identifiers
- CVE-2024-5187
- GHSA-6rq9-53c3-f7vj
- PYSEC-2025-148
Timeline
- 2024-06-06: disclosed
- 2024-06-06: advisory
- 2024-06-06: patched: Version 1.16.2 released