electron-pdf 20.0.0 - Local File Read
7.5
High
Discovered by

Offensive Team, Fluid Attacks
Summary
Full name
electron-pdf 20.0.0 - Local File Read
Code name
State
Public
Release date
Feb 19, 2024
Affected product
electron-pdf
Affected version(s)
Version 20.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
electron-pdf version 20.0.0 allows an external attacker to remotely obtain arbitrary local files. This is possible because the application does not validate the HTML content entered by the user.
Vulnerability
This vulnerability occurs because the application does not validate that the HTML content entered by the user is not malicious.
Exploitation
To exploit this vulnerability, we only need to send the following malicious HTML to electron-pdf:
Exploit.html
Thus, when electron-pdf parses the malicious HTML, it will return the local file specified in the generated PDF.
Evidence of exploitation


Our security policy
We have reserved the ID CVE-2024-1648 to refer to this issue from now on. Disclosure policy
System Information
Version: electron-pdf 20.0.0
Operating System: GNU/Linux
Mitigation
There is currently no patch available for this vulnerability.
References
Vendor page https://www.npmjs.com/package/electron-pdf/
Timeline
Vulnerability discovered
Feb 5, 2024
Vendor contacted
Feb 5, 2024
Public disclosure
Feb 19, 2024