# CVE-2021-40978: Directory traversal in mkdocs

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 15.0%, higher than 96% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-10-07T13:23:41.000Z
- Modified: 2026-06-17T04:07:42.017Z
- Also known as: GHSA-qh9q-34h6-hcv9, PYSEC-2021-878
- Weaknesses: CWE-12, CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: mitre

## 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 this as described in https://github.com/mkdocs/mkdocs/issues/2601.] and https://github.com/nisdn/CVE-2021-40978/issues/1

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- mkdocs (PyPI): from 1.2.2 before 1.2.3
- mkdocs mkdocs: 1.2.2

## Every score

- GitHub: 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`
- GitHub: CVSS:4.0 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`
- NVD: 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`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:P/I:N/A:N`
- PyPA Advisory Database: 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`

## References

- <https://github.com/nisdn/CVE-2021-40978> (exploit, evidence, third-party-advisory, web)
- <https://github.com/mkdocs/mkdocs> (package, third-party-advisory, web)
- <https://github.com/mkdocs/mkdocs/issues/2601> (issue-tracking, report, third-party-advisory, web)
- <https://github.com/nisdn/CVE-2021-40978/issues/1> (issue-tracking, report, third-party-advisory, web)
- <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)

## Sources

- CVE List: [CVE-2021-40978](https://www.cve.org/CVERecord?id=CVE-2021-40978), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-qh9q-34h6-hcv9](https://github.com/advisories/GHSA-qh9q-34h6-hcv9), CC-BY-4.0, modified 2024-10-01
- NVD: [CVE-2021-40978](https://nvd.nist.gov/vuln/detail/CVE-2021-40978), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-878](https://osv.dev/vulnerability/PYSEC-2021-878), CC-BY-4.0, modified 2026-06-10

---

Page: https://cve.day/CVE-2021-40978 · Whole record: https://cve.day/CVE-2021-40978.json · Rebuilt by cve.day 2026-11-25T22:58:04.363Z
