CVE-2026-21851
Path Traversal in MONAI _download_from_ngc_private() Function
Publication date: 2026-01-07
Last updated on: 2026-02-02
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| monai | monai | to 1.5.1 (inc) |
| project-monai | monai | to 1.5.1 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-22 | The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a Path Traversal (Zip Slip) issue in MONAI's _download_from_ngc_private() function. The function uses zipfile.ZipFile.extractall() without validating file paths, which can allow an attacker to write files outside the intended directory by crafting malicious zip files. Other similar functions in the codebase properly use a safe extraction method, but this one did not, leading to the vulnerability.
How can this vulnerability impact me? :
An attacker exploiting this vulnerability could potentially overwrite arbitrary files on the system where MONAI is running by extracting files outside the intended directory. This could lead to unauthorized modification of files, impacting the integrity of the system or application.
What immediate steps should I take to mitigate this vulnerability?
Update MONAI to a version later than 1.5.1 where the vulnerability is fixed (commit 4014c8475626f20f158921ae0cf98ed259ae4d59). Avoid using vulnerable versions and ensure that the _download_from_ngc_private() function does not use zipfile.ZipFile.extractall() without path validation.