{"answers":{"affected":"3 open source packages ship an affected version, including monai. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-21851 exists.","fix":"Upgrade monai to 1.5.2 or later.","what":"CVE-2026-21851 is a medium-severity path traversal vulnerability in Project-MONAI MONAI, published on 7 Jan 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-21851 and fix it if it is affected.\n\nWhat it is: CVE-2026-21851 is a medium-severity path traversal vulnerability in Project-MONAI MONAI, published on 7 Jan 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-21851 exists.\n\nAffected packages and fixed versions:\n- monai (PyPI): affected all versions; fixed in 1.5.2\n- monai (PyPI): affected all versions; fixed in 1.5.2\n- monai (PyPI): affected all versions; fixed in 1.5.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-21851/ (Markdown: https://insights.sbomify.com/CVE-2026-21851/index.md)","id":"CVE-2026-21851","markdown":"https://insights.sbomify.com/CVE-2026-21851/index.md","name":"CVE-2026-21851","record":{"aliases":["GHSA-9rg3-9pvr-6p27","PYSEC-2026-1678"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"MONAI AI toolkit","requires_auth":"none","summary":"Attackers can exploit a path traversal vulnerability in MONAI's private bundle download to write arbitrary files, potentially leading to code execution.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"monai","vendor":"project-monai"}],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"MONAI (Medical Open Network for AI) is an AI toolkit for health care imaging. In versions up to and including 1.5.1, a Path Traversal (Zip Slip) vulnerability exists in MONAI's `_download_from_ngc_private()` function. The function uses `zipfile.ZipFile.extractall()` without path validation, while other similar download functions in the same codebase properly use the existing `safe_extract_member()` function. Commit 4014c8475626f20f158921ae0cf98ed259ae4d59 fixes this issue.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"MONAI has Path Traversal (Zip Slip) in NGC Private Bundle Download","id":"CVE-2026-21851","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":3,"n_references":2,"next":{"headline":"Claude Code Leaks Data via Malicious Environment Configuration Before Trust Confirmation","id":"CVE-2026-21852"},"packages":[{"ecosystem":"PyPI","fixed":["1.5.2"],"introduced":["0"],"last_affected":[],"package":"monai","purl":null,"source":"GHSA-9rg3-9pvr-6p27"},{"ecosystem":"PyPI","fixed":["1.5.2"],"introduced":["0"],"last_affected":[],"package":"monai","purl":"pkg:pypi/monai","source":"GHSA-9rg3-9pvr-6p27"},{"ecosystem":"PyPI","fixed":["1.5.2"],"introduced":["0"],"last_affected":[],"package":"monai","purl":"pkg:pypi/monai","source":"PYSEC-2026-1678"}],"prev":{"headline":"HCL BigFix Service Management is affected by multiple security vulnerabilities.","id":"CVE-2026-21848"},"products":["MONAI"],"published":"2026-01-07","related":[{"cvss_score":8.8,"headline":"MONAI before 1.5.2 Remote Code Execution via Pickle Deserialization","id":"CVE-2026-100846","kev_date_added":null,"published":"2026-09-27"},{"cvss_score":8.6,"headline":"MONAI before 1.6.0 OS Command Injection via dataset_name_or_id","id":"CVE-2026-100844","kev_date_added":null,"published":"2026-09-27"},{"cvss_score":8.5,"headline":"MONAI through 1.6.0 Remote Code Execution via bundle configuration","id":"CVE-2026-100840","kev_date_added":null,"published":"2026-09-27"},{"cvss_score":8.5,"headline":"MONAI through 1.6.0 PersistentDataset Remote Code Execution via Pickle Cache","id":"CVE-2026-100841","kev_date_added":null,"published":"2026-09-27"},{"cvss_score":8.5,"headline":"MONAI before 1.6.0 Remote Code Execution via algo_from_pickle","id":"CVE-2026-100843","kev_date_added":null,"published":"2026-09-27"},{"cvss_score":8.5,"headline":"MONAI before 1.6.0 Remote Code Execution via NumpyReader","id":"CVE-2026-100845","kev_date_added":null,"published":"2026-09-27"},{"cvss_score":7.3,"headline":"MONAI through 1.6.0 _get_fake_spatial_shape eval() Sandbox Bypass via Attribute Chains","id":"CVE-2026-100842","kev_date_added":null,"published":"2026-09-27"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-01-08","vendors":["Project-MONAI"]},"summary":"Attackers can exploit a path traversal vulnerability in MONAI's private bundle download to write arbitrary files, potentially leading to code execution.","url":"https://insights.sbomify.com/CVE-2026-21851/"}