{"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-2023-32309 exists.","fix":"Upgrade pymdown-extensions to 10.0 or later.","what":"CVE-2023-32309 is a high-severity path traversal vulnerability in facelessuser pymdown-extensions, published on 15 May 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-32309 and fix it if it is affected.\n\nWhat it is: CVE-2023-32309 is a high-severity path traversal vulnerability in facelessuser pymdown-extensions, published on 15 May 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-32309 exists.\n\nAffected packages and fixed versions:\n- pymdown-extensions (PyPI): affected from 1.5; fixed in 10.0\n- pymdown-extensions (PyPI): affected from 1.5; fixed in 10.0\n- pymdown-extensions (PyPI): affected from 1.5; fixed in 10.0\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-2023-32309/ (Markdown: https://insights.sbomify.com/CVE-2023-32309/index.md)","id":"CVE-2023-32309","markdown":"https://insights.sbomify.com/CVE-2023-32309/index.md","name":"CVE-2023-32309","record":{"aliases":["DEBIAN-CVE-2023-32309","GHSA-jh85-wwv9-24hv","PYSEC-2026-1824","UBUNTU-CVE-2023-32309"],"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 on the host via directory traversal in the PyMdown Snippets extension if it processes untrusted user input.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"pymdown_extensions","vendor":"facelessuser"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/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. In affected versions an arbitrary file read is possible when using include file syntax. By using the syntax `--8\u003c--\"/etc/passwd\"` or `--8\u003c--\"/proc/self/environ\"` the content of these files will be rendered in the generated documentation. Additionally, a path relative to a specified, allowed base path can also be used to render the content of a file outside the specified base paths: `--8\u003c-- \"../../../../etc/passwd\"`. Within the Snippets extension, there exists a `base_path` option but the implementation is vulnerable to Directory Traversal. The vulnerable section exists in `get_snippet_path(self, path)` lines 155 to 174 in snippets.py. Any readable file on the host where the plugin is executing may have its content exposed. This can impact any use of Snippets that exposes the use of Snippets to external users. It is never recommended to use Snippets to process user-facing, dynamic content. It is designed to process known content on the backend under the control of the host, but if someone were to accidentally enable it for user-facing content, undesired information could be exposed. This issue has been addressed in version 10.0. Users are advised to upgrade. Users unable to upgrade may restrict relative paths by filtering input.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":"2023-05-16","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2023-05-16T11:51:34Z","kind":"github_poc","ref":"https://github.com/itlabbet/CVE-2023-32309","stars":0,"title":"Example project illustrating CVE-2023-32309 vulnerability "}],"tier":"weaponised"},"has_fix":true,"headline":"Arbitrary file inclusion with the pymdowm-snippets extension","id":"CVE-2023-32309","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2023"},"n_packages":3,"n_references":2,"next":{"headline":"DataEase API interface has IDOR vulnerability","id":"CVE-2023-32310"},"packages":[{"ecosystem":"PyPI","fixed":["10.0"],"introduced":["1.5"],"last_affected":[],"package":"pymdown-extensions","purl":null,"source":"GHSA-jh85-wwv9-24hv"},{"ecosystem":"PyPI","fixed":["10.0"],"introduced":["1.5"],"last_affected":[],"package":"pymdown-extensions","purl":"pkg:pypi/pymdown-extensions","source":"GHSA-jh85-wwv9-24hv"},{"ecosystem":"PyPI","fixed":["10.0"],"introduced":["1.5"],"last_affected":[],"package":"pymdown-extensions","purl":"pkg:pypi/pymdown-extensions","source":"PYSEC-2026-1824"}],"prev":{"headline":"SQL Injection Vulnerability in anuko timetracker","id":"CVE-2023-32308"},"products":["pymdown-extensions"],"published":"2023-05-15","related":[{"cvss_score":4.3,"headline":"Regression in pymdownx.snippets reintroduces sibling-prefix path traversal bypass despite restrict_base_path","id":"CVE-2026-46338","kev_date_added":null,"published":"2026-07-16"},{"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)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-01-22","vendors":["facelessuser"]},"summary":"Attackers can read arbitrary files on the host via directory traversal in the PyMdown Snippets extension if it processes untrusted user input.","url":"https://insights.sbomify.com/CVE-2023-32309/"}