PyPI: mkdocs-include-markdown-plugin
CVE-2025-59940
Safety vulnerability ID: SFTY-20250929-70354
Safety legacy ID: pyup.io-79995
Affected versions of the mkdocs-include-markdown-plugin package are vulnerable to Improper Input Validation due to failing to escape internal substitution placeholder markers before processing user-supplied Markdown. In src/mkdocs_include_markdown_plugin/event.py, the get_file_content() pipeline builds and replaces placeholders using STX/ETX control characters, but (before v7.1.8) did not call escape_placeholders, allowing raw \u0002/\u0003 sequences in Markdown to be misinterpreted as plugin placeholders and collide with save_placeholder/replacement logic.
Overview
mkdocs-include-markdown-plugin susceptible to unvalidated input colliding with substitution placeholders
Advisory
Affected versions of the mkdocs-include-markdown-plugin package are vulnerable to Improper Input Validation due to failing to escape internal substitution placeholder markers before processing user-supplied Markdown. In src/mkdocs_include_markdown_plugin/event.py, the get_file_content() pipeline builds and replaces placeholders using STX/ETX control characters, but (before v7.1.8) did not call escape_placeholders, allowing raw \u0002/\u0003 sequences in Markdown to be misinterpreted as plugin placeholders and collide with save_placeholder/replacement logic.
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20250929-70354/CVE-2025-59940
- https://github.com/mondeja/mkdocs-include-markdown-plugin/security/advisories/GHSA-v39m-5m9j-m9w9
- https://github.com/mondeja/mkdocs-include-markdown-plugin/issues/274
- https://github.com/mondeja/mkdocs-include-markdown-plugin/pull/277
- https://github.com/mondeja/mkdocs-include-markdown-plugin/commit/7466d67aa0de8ffbc427204ad2475fed07678915
- https://nvd.nist.gov/vuln/detail/CVE-2025-59940
- https://github.com/advisories/GHSA-v39m-5m9j-m9w9
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more
