Every CVE Search/ Get API key

CVE-2021-40978

Directory traversal in mkdocs

7.5 HighPublic exploitFix availableDisputed

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

15.0%Up 14.4 points since Oct 8, 2021
90%50%10%1%

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 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CVSS 2.0
5.0 MediumAV: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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

Affected packages
PackageAffectedFixed
mkdocs
PyPI
1.2.2 to 1.2.2
1.2.3
python-mkdocs
Debian: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 less
1.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-mkdocs
Debian: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-mkdocs
Debian: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
mkdocs
PyPI
1.2.2 up to 1.2.3
1.2.3

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
NucleiMKdocs 1.2.2 - Directory Traversal
PoC in GitHubnisdn/CVE-2021-409782021-10-04

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE 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

Show 6 moreShow less
MoveEnter Open