CVE-2024-21544
JSON

7.7high

Browsershot Local File Inclusion

Severity
7.7high CVSS:4.0 by snyk
Exploit likelihood
0.57% (higher than 48% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-g2r4-phv7-5fgv

Description

Versions of the package spatie/browsershot before 5.0.1 are vulnerable to Improper Input Validation due to improper URL validation in the setUrl method. An attacker can exploit this vulnerability by using leading whitespace (%20) before the file:// protocol, resulting in Local File Inclusion, which allows the attacker to read sensitive files on the server.

Affected

Product or packageVersionsReported by
spatie/browsershotbefore 5.0.1CVE List
spatie/browsershot (Packagist)before 5.0.1GitHub Advisory Database

All scores

snyk7.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N/E:P
snyk8.6high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N/E:P
GitHub8.6medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N/E:P

Classification

CWE-20

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

Versions of the package spatie/browsershot before 5.0.1 are vulnerable to Improper Input Validation due to improper URL validation in the setUrl method. An attacker can exploit this vulnerability by using leading whitespace (%20) before the file:// protocol, resulting in Local File Inclusion, which allows the attacker to read sensitive files on the server.

GitHub Advisory Database

Versions of the package spatie/browsershot before 5.0.1 are vulnerable to Improper Input Validation due to improper URL validation through the setUrl method. An attacker can exploit this vulnerability by using leading whitespace (%20) before the file:// protocol, resulting in Local File Inclusion, which allows the attacker to read sensitive files on the server.

NVD (es)

Las versiones del paquete spatie/browsershot anteriores a la 5.0.1 son vulnerables a la validación de entrada incorrecta debido a la validación incorrecta de URL a través del método setUrl. Un atacante puede aprovechar esta vulnerabilidad utilizando un espacio inicial (%20) antes del protocolo file://, lo que da como resultado la inclusión de archivos locales, lo que permite al atacante leer archivos confidenciales en el servidor.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-21544 changed 2026-08-14CVE Terms of Use
GitHub Advisory DatabaseGHSA-g2r4-phv7-5fgv changed 2025-02-04CC-BY-4.0
NVDCVE-2024-21544 changed 2026-06-17Public domain