CVE-2024-1648 electron-pdf 20.0.0 - Local File Read via Server Side XSS

High 7.5 Published Updated

An attacker can read arbitrary local files by injecting malicious HTML into the electron-pdf library due to lack of input validation.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2024-1648?

CVE-2024-1648 is a high-severity cross-site scripting vulnerability in electron-pdf, published on 20 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-79

Which versions are affected by CVE-2024-1648?

2 open source packages ship an affected version, including electron-pdf. It affects 1 product.

PackageAffectedFixed in
electron-pdf npmAll versions to 20.0.0None
electron-pdf npmAll versions to 20.0.0None

Products include Fraserxu Electron-Pdf.

How do I fix CVE-2024-1648?

No fix has been published for CVE-2024-1648 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2024-1648 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-1648 exists.

Sources

Also known as GHSA-3jcv-5f9p-2f2p.

Is CVE-2024-1648 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free