# CVE-2022-25882: Directory Traversal in onnx

Source: https://junglewise.ai/threats/cve-2022-25882-directory-traversal-in-onnx  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2023-01-26  
License: CC BY 4.0 with a link back

CVE-2022-25882 · Severity: low · CVSS 3.1 · Published 2023-01-26

Versions of the package onnx before 1.13.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, for example "../../../etc/passwd"

Technologies: [onnx (PyPI)](https://junglewise.ai/threats/technologies/onnx). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2022-25882 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-25882 being exploited in the wild.

**How severe is CVE-2022-25882?** Low severity, with a CVSS score of 3.1, published 26 January 2023.

**Which products and versions are affected?** onnx (PyPI) ECOSYSTEM:introduced=0,fixed=1.13.0, GIT:introduced=0,fixed=f369b0e859024095d721f1d1612da5a8fa38988d|ECOSYSTEM:introduced=0,fixed=1.13.0.

**Is there a fix for CVE-2022-25882?** Yes. onnx (PyPI): upgrade to 1.13.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2022-25882?** 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.13.0 or later

  ```sh
  pip install "onnx>=1.13.0"
  ```


## Affected products

- onnx (PyPI) ECOSYSTEM:introduced=0,fixed=1.13.0, GIT:introduced=0,fixed=f369b0e859024095d721f1d1612da5a8fa38988d|ECOSYSTEM:introduced=0,fixed=1.13.0

## Identifiers

- CVE-2022-25882
- GHSA-ffxj-547x-5j7c
- PYSEC-2023-38

## Related threats

- [ONNX memory exhaustion in packed tensor unpacking](https://junglewise.ai/threats/cve-2026-115922-open-neural-network-exchange-onnx-is-an-open-standard-for)
- [ONNX null pointer dereference in shape inference](https://junglewise.ai/threats/cve-2026-115921-open-neural-network-exchange-onnx-is-an-open-standard-for)
- [ONNX ConvTranspose shape inference denial of service](https://junglewise.ai/threats/cve-2026-115920-open-neural-network-exchange-onnx-is-an-open-standard-for)
- [ONNX out-of-bounds read in RNN shape inference](https://junglewise.ai/threats/cve-2026-115919-open-neural-network-exchange-onnx-is-an-open-standard-for)
- [ONNX TOCTOU race condition in save_external_data](https://junglewise.ai/threats/onnx-toctou-race-condition-in-save-external-data-b85422b8)
