CVE-2023-32309 Arbitrary file inclusion with the pymdowm-snippets extension
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: yes · technical impact: partial
- Technology
- UbuntuDebian
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<--"/etc/passwd" or --8<--"/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<-- "../../../../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.
Upgrade path
7 packages: 4 fixed, 2 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/pymdown-extensions(Debian 12) | = 9.5-2; = 9.5-3; = 9.5-4; = 9.5-5 +11 more | No fix listed | No fix yet |
| ubuntu/pymdown-extensions(Ubuntu 24.04) | = 9.5-2; = 9.5-4; = 9.5-5; All versions | No fix listed | No fix yet |
| debian/pymdown-extensions(Debian 13) | < 10.8.1-1 | 10.8.1-1 | Fixed |
| debian/pymdown-extensions(Debian 14) | < 10.8.1-1 | 10.8.1-1 | Fixed |
| facelessuser pymdown extensions | >= 1.5.0, < 10.0 | 10.0 | Fixed |
| pypi pymdown-extensions(PyPI) | = 1.5; = 1.6; = 1.6.1; = 1.7 +68 more | 10.0 | Fixed |
| facelessuser pymdown-extensions | = >= 1.5, < 10.0 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi pymdown-extensions(PyPI) | >= 1.5, < 10.0 | 10.0 |
| pypi pymdown-extensions(PyPI) | = 1.5 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 1.6 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 1.6.1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 1.7 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 1.8 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 2.0 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 3.0 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 3.1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 3.2 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 3.2.1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 3.3 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 3.4 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 3.5 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.0 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.10 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.10.1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.10.2 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.11 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.12 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.2 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.3 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.4 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.5 | No fix listed |
Show 70 more
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi pymdown-extensions(PyPI) | = 4.5.1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.6 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.7 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.8 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.9 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.9.1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 4.9.2 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 5.0 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 6.0 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 6.1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 6.2 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 6.2.1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 6.3 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 7.0 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 7.0b1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 7.0b2 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 7.0rc1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 7.0rc2 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 7.1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 8.0 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 8.0.1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 8.1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 8.1.1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 8.2 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.0 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.0.dev0 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.10 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.10a1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.10a2 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.10a3 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.10b1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.10b2 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.10b3 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.10b4 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.10b5 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.11 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.2 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.3 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.4 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.5 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.6 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.7 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.8 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.9 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.9.1 | No fix listed |
| pypi pymdown-extensions(PyPI) | = 9.9.2 | No fix listed |
| debian/pymdown-extensions(Debian:12) | All versions | No fix listed |
| debian/pymdown-extensions(Debian:12) | = 10.11.2-1 | No fix listed |
| debian/pymdown-extensions(Debian:12) | = 10.13-1 | No fix listed |
| debian/pymdown-extensions(Debian:12) | = 10.13-2 | No fix listed |
| debian/pymdown-extensions(Debian:12) | = 10.13-3 | No fix listed |
| debian/pymdown-extensions(Debian:12) | = 10.13-4 | No fix listed |
| debian/pymdown-extensions(Debian:12) | = 10.19.1-1 | No fix listed |
| debian/pymdown-extensions(Debian:12) | = 10.19.1-3 | No fix listed |
| debian/pymdown-extensions(Debian:12) | = 10.8.1-1 | No fix listed |
| debian/pymdown-extensions(Debian:12) | = 10.9-1 | No fix listed |
| debian/pymdown-extensions(Debian:12) | = 11.0.1-1 | No fix listed |
| debian/pymdown-extensions(Debian:12) | = 9.5-2 | No fix listed |
| debian/pymdown-extensions(Debian:12) | = 9.5-3 | No fix listed |
| debian/pymdown-extensions(Debian:12) | = 9.5-4 | No fix listed |
| debian/pymdown-extensions(Debian:12) | = 9.5-5 | No fix listed |
| debian/pymdown-extensions(Debian:13) | < 10.8.1-1 | 10.8.1-1 |
| debian/pymdown-extensions(Debian:14) | < 10.8.1-1 | 10.8.1-1 |
| facelessuser pymdown-extensions | = >= 1.5, < 10.0 | No fix listed |
| facelessuser pymdown extensions | >= 1.5.0, < 10.0 | 10.0 |
| ubuntu/pymdown-extensions(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/pymdown-extensions(Ubuntu:24.04) | = 9.5-2 | No fix listed |
| ubuntu/pymdown-extensions(Ubuntu:24.04) | = 9.5-4 | No fix listed |
| ubuntu/pymdown-extensions(Ubuntu:24.04) | = 9.5-5 | No fix listed |
References
- https://github.com/facelessuser/pymdown-extensions/security/advisories/GHSA-jh85-wwv9-24hv exploit issue-tracking vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/facelessuser/pymdown-extensions/commit/b7bb4878d6017c03c8dc97c42d8d3bb6ee81db9d patch
- github.com product
- github.com
- github.com vendor-advisory
- pypi.org product
- Debian Security Tracker CVE-2023-32309 vendor-advisory
- Ubuntu CVE tracker issue-tracking vendor-advisory
- www.cve.org issue-tracking