CVE-2025-51480

8.8

ONNX · ONNX

A path traversal vulnerability in the ONNX library allows unauthenticated attackers to overwrite arbitrary files through crafted external data paths.

Executive summary

A critical path traversal vulnerability in ONNX version 1.17.0 permits unauthenticated attackers to overwrite arbitrary files on the host system, posing a severe risk to data integrity and system control.

Vulnerability

The vulnerability exists within the onnx.external_data_helper.save_external_data function, where improper validation of external data location paths allows for directory traversal sequences. This flaw is exploitable by an unauthenticated attacker who can influence the processing of crafted external data.

Business impact

The ability to overwrite arbitrary files on a system can lead to full system compromise, including the injection of malicious code or the destruction of critical configuration files. With a CVSS score of 8.8, this vulnerability represents a high-severity risk that could result in significant data loss or unauthorized administrative access to the underlying infrastructure.

Remediation

Immediate Action: Upgrade the ONNX package to version 1.16.2 or later to incorporate the necessary directory traversal protections.

Proactive Monitoring: Monitor filesystem activity for unusual write operations, specifically targeting sensitive directories or system configuration files, originating from the application process.

Compensating Controls: Implement strict input validation or sandboxing for any untrusted model files or external data inputs before they are processed by the ONNX library.

Exploitation status

Public Exploit Available: Yes — a technical write-up detailing the exploit mechanism is available via the researcher's blog referenced in the security advisory.

Analyst recommendation

Given the severity of this file overwrite vulnerability, organizations utilizing ONNX must prioritize the update to the patched version immediately. This flaw provides a clear path for attackers to gain elevated control over affected systems, and the existence of a public proof-of-concept increases the likelihood of opportunistic exploitation. Ensure that all downstream dependencies are also audited for this specific version.

Sources