CVE-2024-37169:
Arbitrary file read via Playwright's screenshot feature exploiting file wrapper
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.58284%
CWE
Published
6/5/2024
Updated
6/11/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
@jmondi/url-to-png | npm | < 2.0.3 | 2.0.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from two key points: 1) The zodStringUrl
validation in schema.ts
lacked protocol restrictions, allowing 'file://' URIs. 2) The middleware propagated these invalid URLs to Playwright
. The commit fixed both by adding protocol validation in schema.ts
and improving error messaging in the middleware. The tests added for file://
URLs confirm these were the attack vectors. Both components directly handled the untrusted input without proper sanitization pre-patch.