CVE-2021-40978
HIGH 7.5CVSS 3.1Directory 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
- Published
- 7 Oct 2021
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-12CWE-22
- Also known as
- GHSA-qh9q-34h6-hcv9PYSEC-2021-878
- Sources
- NVDJSONOSV GHSA-qh9q-34h6-hcv9JSONOSV PYSEC-2021-878JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | PyPA | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | mkdocs | mkdocscpe:2.3:a:mkdocs:mkdocs:1.2.2:*:*:*:*:*:*:* |
= 1.2.2 | |
| OSV | PyPI | mkdocs | >= 1.2.2, < 1.2.3 | 1.2.3 |
References
- https://github.com/mkdocs/mkdocs · Third Party Advisory, PACKAGE, WEB
- https://github.com/mkdocs/mkdocs/issues/2601 · Issue Tracking, Third Party Advisory, WEB, REPORT
- https://github.com/nisdn/CVE-2021-40978 · Exploit, Third Party Advisory, WEB, EVIDENCE
- https://github.com/nisdn/CVE-2021-40978/issues/1 · Issue Tracking, Third Party Advisory, WEB, REPORT
- https://nvd.nist.gov/vuln/detail/CVE-2021-40978 · ADVISORY
- https://github.com/mkdocs/mkdocs/pull/2604 · WEB
- https://github.com/mkdocs/mkdocs/commit/1b15412f4caae476c262210315fd068d0521a833 · WEB
- https://github.com/mkdocs/mkdocs/commit/57540911a0d632674dd23edec765189f96f84f6b · WEB
- https://github.com/mkdocs/mkdocs/releases/tag/1.2.3 · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/mkdocs/PYSEC-2021-878.yaml · WEB
- https://github.com/advisories/GHSA-qh9q-34h6-hcv9 · ADVISORY
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 7 Oct 2021)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Oct 2021)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 12 Oct 2021)