CVE-2021-40978 in the critical feed json
Directory traversal in mkdocs
published 2021-10-07 5 y ago modified 2026-06-17 4 mo ago also GHSA-qh9q-34h6-hcv9 , PYSEC-2021-878 , EUVD-2021-0136
- cvss
- 7.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 15.0%
- EPSS 15.0% chance of exploitation in 30 days, percentile 96%
- public exploits
- 0
- none known, plus a Nuclei check
Summary
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
Patch / fix
- pypi mkdocs 1.2.3
- github.com/mkdocs/mkdocs@1b15412 commit
- github.com/mkdocs/mkdocs@5754091 commit
- github.com/mkdocs/mkdocs#2604 pull request
- github.com/mkdocs/mkdocs/releases/tag/1.2.3 release
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-40978 updated cvss 7.5
mkdocs: Directory traversal in dev-server
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present “The built-in dev-serve is known to not be secure and should not be used in a sensitive environment. Users should use it only as a development server.”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
14.98% chance of exploitation in the next 30 days, higher than 96% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- Nuclei template MKdocs 1.2.2 - Directory Traversal nuclei detection template
- github.com https://github.com/nisdn/CVE-2021-40978 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
| OSV | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | mkdocs | >=1.2.2, <1.2.3 |
1.2.3 |
Classification
References
-
github.com
/mkdocs/mkdocs/pull/2604
web
-
github.com
/mkdocs/mkdocs/commit/1b15412f4caae476c262210315fd068d0521a833
web
-
github.com
/mkdocs/mkdocs/commit/57540911a0d632674dd23edec765189f96f84f6b
web
-
github.com
/nisdn/CVE-2021-40978
web, exploit, third-party-advisory, evidence
-
github.com
/mkdocs/mkdocs
package, third-party-advisory, web
-
github.com
/mkdocs/mkdocs/issues/2601
web, issue-tracking, third-party-advisory, report
-
github.com
/nisdn/CVE-2021-40978/issues/1
web, issue-tracking, third-party-advisory, report
-
nvd.nist.gov
/vuln/detail/CVE-2021-40978
advisory
-
github.com
/mkdocs/mkdocs/releases/tag/1.2.3
web
-
github.com
/pypa/advisory-database/tree/main/vulns/mkdocs/PYSEC-2021-878.yaml
web
-
github.com
/advisories/GHSA-qh9q-34h6-hcv9
advisory
Sources
- CVE List CVE-2021-40978
- GitHub Advisory GHSA-qh9q-34h6-hcv9
- NVD CVE-2021-40978
- OSV PYSEC-2021-878
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.