PyPI: mkdocs
CVE-2021-40978
Safety vulnerability ID: SFTY-20211007-44364
Safety legacy ID: pyup.io-54697
Mkdocs 1.2.3 includes a fix for CVE-2021-40978: Built-in dev-server allows directory traversal using the port 8000, enabling remote exploitation to obtain sensitive information. NOTE: the vendor doesn't agree this is a security flaw. "It should be mentioned the dev server is known to not be secure and should not be used in a sensitive environment. The security flaw is using the dev-server in an unsafe way, e.g., as a public server and not just as a development server."
Overview
Directory traversal in mkdocs
Advisory
Mkdocs 1.2.3 includes a fix for CVE-2021-40978: Built-in dev-server allows directory traversal using the port 8000, enabling remote exploitation to obtain sensitive information. NOTE: the vendor doesn't agree this is a security flaw. "It should be mentioned the dev server is known to not be secure and should not be used in a sensitive environment. The security flaw is using the dev-server in an unsafe way, e.g., as a public server and not just as a development server."
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20211007-44364/CVE-2021-40978
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-40978
- https://github.com/advisories/GHSA-qh9q-34h6-hcv9
- https://github.com/mkdocs/mkdocs
- https://github.com/mkdocs/mkdocs/issues/2601
- https://github.com/mkdocs/mkdocs/pull/2604
- https://github.com/mkdocs/mkdocs/pull/2604/commits/cddc453c9d49298e60e7d56fb71130c151cbcbe5
- https://github.com/mkdocs/mkdocs/releases/tag/1.2.3
- https://github.com/nisdn/CVE-2021-40978
- https://github.com/nisdn/CVE-2021-40978/issues/1
- https://nvd.nist.gov/vuln/detail/CVE-2021-40978
- https://nvd.nist.gov/vuln/detail/CVE-2021-40978
- https://github.com/mkdocs/mkdocs/issues/2601
- https://github.com/mkdocs/mkdocs
- https://github.com/nisdn/CVE-2021-40978/issues/1
- https://github.com/mkdocs/mkdocs/pull/2604
- https://github.com/mkdocs/mkdocs/releases/tag/1.2.3
- https://github.com/nisdn/CVE-2021-40978
- https://github.com/mkdocs/mkdocs/commit/57540911a0d632674dd23edec765189f96f84f6b
- https://github.com/pypa/advisory-database/tree/main/vulns/mkdocs/PYSEC-2021-878.yaml
- https://github.com/mkdocs/mkdocs/commit/1b15412f4caae476c262210315fd068d0521a833
- https://github.com/advisories/GHSA-qh9q-34h6-hcv9
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
