CVE-2021-40978
Directory traversal in mkdocs
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
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
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/2601.] and https://github.com/nisdn/CVE-2021-40978/issues/1
- Record
CVE-2021-40978- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:P/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
CVE List No score
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
- Record
CVE-2021-40978- Updated
- 2026-11-02
EUVDEUVD-2021-0136 No score
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
- Record
EUVD-2021-0136- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-qh9q-34h6-hcv9
8.7
Directory traversal in mkdocs
The mkdocs 1.2.2 built-in dev-server allows directory traversal using the port 8000, enabling remote exploitation to obtain :sensitive information.
- Record
GHSA-qh9q-34h6-hcv9- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-12, CWE-22
- Updated
- 2026-11-02
OSV
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/2601.] and https://github.com/nisdn/CVE-2021-40978/issues/1
- Record
CVE-2021-40978- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-40978
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/2601.] and https://github.com/nisdn/CVE-2021-40978/issues/1
- Record
DEBIAN-CVE-2021-40978- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVGHSA-qh9q-34h6-hcv9
8.7
Directory traversal in mkdocs
The mkdocs 1.2.2 built-in dev-server allows directory traversal using the port 8000, enabling remote exploitation to obtain :sensitive information.
- Record
GHSA-qh9q-34h6-hcv9- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-12, CWE-22
- Updated
- 2026-11-02
OSVPYSEC-2021-878
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/2601.] and https://github.com/nisdn/CVE-2021-40978/issues/1
- Record
PYSEC-2021-878- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
mkdocsPyPI |
1.2.2 to 1.2.2 | 1.2.3 |
python-mkdocsDebian:12 |
All versions, plus listed versions 1.4.2+dfsg-21.5.2+dfsg-11.5.3+dfsg-11.5.3+dfsg-21.6.1+dfsg-1 Show 7 moreShow less1.6.1+dfsg-21.6.1+dfsg-31.6.1+dfsg1-11.6.1+dfsg1-21.6.1+dfsg1-31.6.1+dfsg1-41.6.1+dfsg1-5 |
None known |
python-mkdocsDebian:13 |
All versions, plus listed versions 1.6.1+dfsg1-21.6.1+dfsg1-31.6.1+dfsg1-41.6.1+dfsg1-5 |
None known |
python-mkdocsDebian:14 |
All versions, plus listed versions 1.6.1+dfsg1-21.6.1+dfsg1-31.6.1+dfsg1-41.6.1+dfsg1-5 |
None known |
mkdocsPyPI |
1.2.2 up to 1.2.3 | 1.2.3 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| Nuclei | MKdocs 1.2.2 - Directory Traversal | |
| PoC in GitHub | nisdn/CVE-2021-40978 | 2021-10-04 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, Nuclei, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-40978 is a high vulnerability (CVSS 7.5) in Mkdocs, published October 7, 2021. Its validity is disputed. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 15.0%, the 96th percentile. Fixed in mkdocs 1.2.3.
References
github.com/mkdocs/mkdocs
github.com/nisdn/CVE-2021-40978
github.com/mkdocs/mkdocs/issues/2601
github.com/nisdn/CVE-2021-40978/issues/1
nvd.nist.gov/vuln/detail/CVE-2021-40978
github.com/mkdocs/mkdocs/pull/2604
Show 6 moreShow less
github.com/mkdocs/mkdocs/releases/tag/1.2.3
github.com/mkdocs/mkdocs/commit/57540911a0d632674dd23edec765189f96f84f6b
github.com/pypa/advisory-database/tree/main/vulns/mkdocs/PYSEC-2021-878.yaml
github.com/mkdocs/mkdocs/commit/1b15412f4caae476c262210315fd068d0521a833
github.com/advisories/GHSA-qh9q-34h6-hcv9
security-tracker.debian.org/tracker/CVE-2021-40978