CVE-2024-27318 Onnx Directory Traversal vulnerability

High 7.5 Published Updated

An attacker can read arbitrary files outside the model directory via a crafted external_data field in ONNX tensor protos.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-27318?

CVE-2024-27318 is a high-severity path traversal vulnerability in Fedoraproject Fedora, published on 23 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Versions of the package onnx before and including 1.15.0 are vulnerable to Directory Traversal as the external_data field of the tensor proto can have a path to the file which is outside the model current directory or user-provided directory. The vulnerability occurs as a bypass for the patch added for CVE-2022-25882.

Weakness: CWE-22

Which versions are affected by CVE-2024-27318?

3 open source packages ship an affected version, including onnx. It affects 2 products.

PackageAffectedFixed in
onnx PyPIAll versions1.16.0
onnx PyPIAll versions1.16.0
onnx PyPIAll versions1.16.0

Products include Fedoraproject Fedora, Linuxfoundation Onnx.

How do I fix CVE-2024-27318?

Upgrade onnx to 1.16.0 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2024-27318 being exploited?

There is no known exploitation of CVE-2024-27318 in the wild and no public exploit code.

All Fedoraproject Fedora vulnerabilities

Sources

Also known as AZL-34464, AZL-35146, GHSA-whh8-fjgc-qp73, PYSEC-2024-222.

Is CVE-2024-27318 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free