{"answers":{"affected":"3 open source packages ship an affected version, including pymdown-extensions. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-46338 exists.","fix":"Upgrade pymdown-extensions to 10.21.3 or later.","what":"CVE-2026-46338 is a medium-severity path traversal vulnerability in facelessuser pymdown-extensions, published on 16 Jul 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-46338 and fix it if it is affected.\n\nWhat it is: CVE-2026-46338 is a medium-severity path traversal vulnerability in facelessuser pymdown-extensions, published on 16 Jul 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-46338 exists.\n\nAffected packages and fixed versions:\n- pymdown-extensions (PyPI): affected from 10.0.1; fixed in 10.21.3\n- pymdown-extensions (PyPI): affected from 10.0.1; fixed in 10.21.3\n- pymdown-extensions (PyPI): affected from 10.0.1; fixed in 10.21.3\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-46338/ (Markdown: https://insights.sbomify.com/CVE-2026-46338/index.md)","id":"CVE-2026-46338","markdown":"https://insights.sbomify.com/CVE-2026-46338/index.md","name":"CVE-2026-46338","record":{"aliases":["DEBIAN-CVE-2026-46338","GHSA-62q4-447f-wv8h","PYSEC-2026-2999","ROOT-APP-PYPI-CVE-2026-46338","UBUNTU-CVE-2026-46338"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":true,"product_category":"Python Markdown extension","requires_auth":"none","summary":"Attackers can read arbitrary files from sibling directories via path traversal in PyMdown Extensions when restrict_base_path is enabled.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"pymdown_extensions","vendor":"facelessuser"}],"cvss":{"score":4.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"PyMdown Extensions is a set of extensions for the Python-Markdown markdown project. From 10.0.1 until 10.21.3, pymdownx.snippets uses a string-prefix containment check in SnippetPreprocessor.get_snippet_path() in pymdownx/snippets.py when `restrict_base_path: True`, allowing markdown snippet directives to read files from sibling paths that share the same base_path prefix, such as docs and docs_internal. This is a regression of CVE-2023-32309. This issue is fixed in version 10.21.3.","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":"Regression in pymdownx.snippets reintroduces sibling-prefix path traversal bypass despite restrict_base_path","id":"CVE-2026-46338","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":3,"n_references":3,"next":{"headline":"9Router: Unauthenticated Remote Code Execution via unprotected MCP custom plugin routes","id":"CVE-2026-46339"},"packages":[{"ecosystem":"PyPI","fixed":["10.21.3"],"introduced":["10.0.1"],"last_affected":[],"package":"pymdown-extensions","purl":null,"source":"GHSA-62q4-447f-wv8h"},{"ecosystem":"PyPI","fixed":["10.21.3"],"introduced":["10.0.1"],"last_affected":[],"package":"pymdown-extensions","purl":"pkg:pypi/pymdown-extensions","source":"GHSA-62q4-447f-wv8h"},{"ecosystem":"PyPI","fixed":["10.21.3"],"introduced":["10.0.1"],"last_affected":[],"package":"pymdown-extensions","purl":"pkg:pypi/pymdown-extensions","source":"PYSEC-2026-2999"}],"prev":{"headline":"WWBN AVideo: Unauthenticated Arbitrary Image Read via Path Traversal in `view/img/image404Raw.php`","id":"CVE-2026-46337"},"products":["pymdown-extensions"],"published":"2026-07-16","related":[{"cvss_score":7.5,"headline":"Arbitrary file inclusion with the pymdowm-snippets extension","id":"CVE-2023-32309","kev_date_added":null,"published":"2023-05-15"},{"cvss_score":2.7,"headline":"PyMdown Extensions has ReDOS bug in Figure Capture extension","id":"CVE-2025-68142","kev_date_added":null,"published":"2025-12-16"}],"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-07-17","vendors":["facelessuser"]},"summary":"Attackers can read arbitrary files from sibling directories via path traversal in PyMdown Extensions when restrict_base_path is enabled.","url":"https://insights.sbomify.com/CVE-2026-46338/"}