Skip to content
Fencer Vulns
high 7.5

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

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 products
    not 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

Weakness
  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory
  • CWE-12 ASP.NET Misconfiguration: Missing Custom Error Page

References

Sources

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.