CVE-2021-40978Mkdocs
High 7.5 No auth neededHigh EPSS
Follow: this CVE · Mkdocs · Mkdocs We alert you by email or Slack (account required).
- Priority
- 61
- CVSS 3.1
- 7.5
- EPSS
- 15.0% probability of exploitation in 30 days · percentile 97
- Auth required
- No
- Published
- Oct 7, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-22
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
What happens
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
What to do
- Apply the vendor's security update for Mkdocs.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | mkdocs |
≥ 1.2.2 < 1.2.3 |
1.2.3 |
pip install "mkdocs>=1.2.3" |
| PyPI | mkdocs |
≥ 1.2.2 < 1.2.3 |
1.2.3 |
pip install "mkdocs>=1.2.3" |
Per OSV / GitHub Advisories (GHSA-qh9q-34h6-hcv9, PYSEC-2021-878). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| mkdocs | mkdocs | 1.2.2 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Third Party Advisory
- github.com Issue Tracking Third Party Advisory
- github.com Exploit Third Party Advisory
- github.com Issue Tracking Third Party Advisory