Browsershot 3.57.2 - Server Side XSS to LFR via URL

Summary

NameBrowsershot 3.57.2 - Server Side XSS to LFR via URL
Code nameEminem
ProductBrowsershot
Affected versionsVersion 3.57.2
StatePublic
Release date2022-10-28

Vulnerability

KindServer Side XSS
Rule425. Server Side XSS
RemoteYes
CVSSv3 VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CVSSv3 Base Score7.5
Exploit availableYes
CVE ID(s)CVE-2022-41706

Description

Browsershot version 3.57.2 allows an external attacker to remotely obtain arbitrary local files. This is possible because the application does not validate the URL protocol passed to the Browsershot::url method.

Vulnerability

This vulnerability occurs because the application does not validate the URL protocol passed to the Browsershot::url method. Thanks to this, an attacker can point to internal server files, which will be reflected in the PDF that will be generated.

Exploitation

LFR-via-URL-PDF-Generation

exploit.png

Our security policy

We have reserved the CVE-2022-41706 to refer to these issues from now on.

System Information

  • Version: Browsershot 3.57.2

  • Operating System: GNU/Linux

Mitigation

An updated version of Browsershot is available at the vendor page.

Credits

The vulnerability was discovered by Carlos Bello from Fluid Attacks' Offensive Team.

References

Vendor page https://github.com/spatie/browsershot

Release https://github.com/spatie/browsershot/releases/tag/3.57.3

Timeline

Time-lapse-logo

2022-10-25

Vulnerability discovered.

Time-lapse-logo

2022-10-25

Vendor contacted.

Time-lapse-logo

2022-10-25

Vendor replied acknowledging the report.

Time-lapse-logo

2022-10-25

Vendor Confirmed the vulnerability.

Time-lapse-logo

2022-10-25

Vulnerability patched.

Time-lapse-logo

2022-10-28

Public Disclosure.