PT-2024-28731

CVE-2024-39918

·

Published

2024-07-15

·

Updated

2024-07-16

Description by

CVSS 4.0
6.9
Medium
MetricsAV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions @jmondi/url-to-png versions prior to 2.1.2
Description The issue arises from the lack of sanitization of the ImageId input in the code, leading to a path traversal vulnerability. This allows an attacker to store an image in an arbitrary location that the server has permission to access. The vulnerability is different from traditional path traversal issues, as it enables storing images in any location. There are no known workarounds for this issue.
Recommendations For versions prior to 2.1.2, upgrade to version 2.1.2 to address the issue. As a temporary workaround, consider sanitizing the ImageId input by removing special characters from the parameters, such as using the slugify function for the params. For example, modify the imageId assignment to const imageId = dateString + "." + slugify(validData.url) + slugify(configToString(params));. This will help prevent path traversal attacks until the official patch is applied.
Exploitability
Exploit
Fix
Impacts
Researchers
Vendors
Affected products
Related identifiers
GHSA-VVMV-WRVP-9GJR
Found an issue in the description? Have something to add? Feel free to write us 👾