CVE-2024-37169: @jmondi/url to png Arbitrary File Read Vulnerability
MODERATECVE-2024-37169 is a MODERATE (CVSS 5.3) arbitrary file read vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting @jmondi/url to png libraries in the npm ecosystem. The issue involves arbitrary file read via playwright's screenshot feature exploiting file wrapper. Remediation is available by upgrading affected packages to version 2.0.3.
CVE-2024-37169 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2024-37169
To remediate this vulnerability, upgrade all affected @jmondi/url to png dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @jmondi/url-to-png@2.0.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @jmondi/url-to-png
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-37169, inspect your project dependencies using npm:
npm ls @jmondi/url-to-png
Analyze the terminal output to locate any version of @jmondi/url to png in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.3), your application is affected.
Note: The npm ls @jmondi/url-to-png command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In @jmondi/url to png, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-37169 Affected @jmondi/url to png Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@jmondi/url-to-png
|
npm |
< 2.0.3
|
2.0.3
|
References
Frequently Asked Questions
What is CVE-2024-37169?
Which @jmondi/url to png versions are affected?
What version fixes CVE-2024-37169?
Is @jmondi/url-to-png affected?
What is the CVSS score of CVE-2024-37169?
What CWE is associated with CVE-2024-37169?
How can I check npm dependencies for CVE-2024-37169?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-665w-mwrr-77q3",
"modified" : "2024-06-11T18:27:37Z",
"published" : "2024-06-05T13:29:10Z",
"aliases" : [ "CVE-2024-37169" ],
"summary" : "Arbitrary file read via Playwright's screenshot feature exploiting file wrapper",
"details" : "### Impact\n\nAll users of url-to-png. Please see https://github.com/jasonraimondi/url-to-png/issues/47\n\n### Patches\n\n[v2.0.3](https://github.com/jasonraimondi/url-to-png/releases/tag/v2.0.3) requires input url to be of protocol `http` or `https` \n\n### Workarounds\n\nRequires upgrade.\n\n### References\n\n- https://github.com/jasonraimondi/url-to-png/issues/47\n- https://github.com/user-attachments/files/15536336/Arbitrary.File.Read.via.Playwright.s.Screenshot.Feature.Exploiting.File.Wrapper.pdf\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@jmondi/url-to-png"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jasonraimondi/url-to-png/security/advisories/GHSA-665w-mwrr-77q3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-37169"
}, {
"type" : "WEB",
"url" : "https://github.com/jasonraimondi/url-to-png/issues/47"
}, {
"type" : "WEB",
"url" : "https://github.com/jasonraimondi/url-to-png/commit/9336020c5e603323f5cf4a2ac3bb9a7735cf61f7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jasonraimondi/url-to-png"
}, {
"type" : "WEB",
"url" : "https://github.com/jasonraimondi/url-to-png/releases/tag/v2.0.3"
}, {
"type" : "WEB",
"url" : "https://github.com/user-attachments/files/15536336/Arbitrary.File.Read.via.Playwright.s.Screenshot.Feature.Exploiting.File.Wrapper.pdf"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-06-05T13:29:10Z",
"nvd_published_at" : "2024-06-10T22:15:12Z"
}
}