Platform
python
Component
onnx
Fixed in
1.16.2
CVE-2024-5187 is an Arbitrary File Access vulnerability discovered in the onnx framework, affecting versions up to 1.9.0. This flaw allows attackers to overwrite files on a system by exploiting inadequate path traversal prevention during tar file extraction. Successful exploitation could lead to remote code execution, data loss, and system compromise. A patch is available in version 1.16.2.
The vulnerability lies within the downloadmodelwithtestdata function, which handles tar file extraction without proper validation of file paths. An attacker can craft a malicious tar archive containing paths designed to overwrite arbitrary files on the system. This could involve overwriting critical system files, configuration files, or application data, leading to a complete system takeover. The potential impact extends beyond data corruption; successful file overwrites could facilitate remote code execution, allowing an attacker to execute arbitrary commands with the privileges of the process running the onnx framework. This vulnerability shares similarities with other path traversal exploits where attackers manipulate file paths to access or modify unauthorized resources.
CVE-2024-5187 was publicly disclosed on June 6, 2024. The vulnerability's severity is rated HIGH with a CVSS score of 8.8. Currently, there are no known public exploits or active campaigns targeting this vulnerability. It is not listed on the CISA KEV catalog as of this writing. Monitor security advisories and threat intelligence feeds for any updates regarding exploitation attempts.
Exploit Status
EPSS
1.36% (80% percentile)
CISA SSVC
CVSS Vector
The primary mitigation is to upgrade to version 1.16.2 or later, which includes the necessary security fixes. If upgrading immediately is not feasible, consider implementing temporary workarounds. One approach is to restrict the directories where the onnx framework can extract tar files, limiting the potential impact of a successful attack. Additionally, implement strict input validation on any tar files processed by the framework, verifying that the extracted paths are within expected boundaries. Consider using a Web Application Firewall (WAF) to filter out malicious tar files containing suspicious path patterns. After upgrading, confirm the fix by attempting to extract a known malicious tar file and verifying that the file access is denied.
Actualice la biblioteca onnx a una versión posterior a la 1.16.0 que corrija la vulnerabilidad de path traversal. Verifique las notas de la versión para confirmar que la vulnerabilidad CVE-2024-5187 ha sido abordada. Puede actualizar la biblioteca utilizando el gestor de paquetes pip: `pip install --upgrade onnx`.
Vulnerability analysis and critical alerts directly to your inbox.
CVE-2024-5187 is a HIGH severity vulnerability in the onnx framework versions up to 1.9.0 that allows attackers to overwrite files via malicious tar files, potentially leading to remote code execution.
You are affected if you are using onnx versions 1.9.0 or earlier. Check your installed version and upgrade if necessary.
Upgrade to version 1.16.2 or later to remediate the vulnerability. Implement temporary workarounds like restricting extraction directories if immediate upgrade is not possible.
As of now, there are no known public exploits or active campaigns targeting CVE-2024-5187, but continuous monitoring is recommended.
Refer to the onnx project's security advisories and release notes for detailed information: [https://github.com/onnx/onnx/security/advisories](https://github.com/onnx/onnx/security/advisories)
Upload your dependency file and we'll tell you instantly if this and other CVEs hit you.
Upload your requirements.txt file and we'll tell you instantly if you're affected.