CVE-2021-40978: The mkdocs 1.2.2 built-in dev-server allows directory traversal using the port 8000, enabling remote exploitat
CVE-2021-40978 is a high-severity flaw (CVSS 7.5) affecting mkdocs. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
The mkdocs 1.2.2 built-in dev-server allows directory traversal using the port 8000, enabling remote exploitation to obtain :sensitive information. NOTE: the vendor has disputed this as described in https://github.com/mkdocs/mkdocs/issues/2601.] and https://github.com/nisdn/CVE-2021-40978/issues/1
Why this priority
- High severity
- EPSS top 3%: very likely to be exploited
- Public exploit reference
- Remotely exploitable, no login, no user action
No fix is published yet: follow the downgrade or mitigation steps.
Risk facts
| CVSS score | 7.5 (High) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 15.1% (top 3%) |
| CISA exploited list | No |
| Weakness | CWE-22 |
| Published | 2021-10-07 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Public exploits and detection
Public code exists for this CVE. Treat unpatched systems as at risk, and only run PoCs in a lab.
- Nuclei scan template: MKdocs 1.2.2 - Directory Traversal
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2021-40978?
mkdocs: downgrade or apply the listed mitigation. Exact commands for each OS are on this page.
Is CVE-2021-40978 being exploited?
CVE-2021-40978 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2021-40978 affect?
CVE-2021-40978 affects mkdocs. Severity is high (CVSS 7.5). The mkdocs 1.2.2 built-in dev-server allows directory traversal using the port 8000, enabling remote exploitation to obtain :sensitive information. NOTE: the vendor has disputed this as described in https://github.com/mkdocs/mkdocs/issues/2
How urgent is CVE-2021-40978?
Priority 60/100. High severity; EPSS top 3%: very likely to be exploited; Public exploit reference; Remotely exploitable, no login, no user action