CVE-2024-37169

5.3 MEDIUM

📋 TL;DR

This vulnerability in @jmondi/url-to-png allows attackers to read arbitrary files from the server by exploiting Playwright's screenshot feature with file wrapper URLs. It affects all self-hosted instances running versions before 2.0.3. The issue occurs because the utility accepted file:// URLs, enabling local file system access.

💻 Affected Systems

Products:
  • @jmondi/url-to-png
Versions: All versions prior to 2.0.3
Operating Systems: All operating systems where the utility runs
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects self-hosted instances of the utility. The vulnerability is present in the default configuration.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server file system compromise including sensitive configuration files, credentials, and application source code disclosure.

🟠

Likely Case

Unauthorized reading of sensitive files such as configuration files, environment variables, or application secrets stored on the server.

🟢

If Mitigated

Limited impact if proper network segmentation and file permissions are in place, though sensitive data could still be exposed.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Detailed exploit documentation is available in the PDF attachment. The vulnerability requires no authentication and has simple exploitation steps.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.0.3

Vendor Advisory: https://github.com/jasonraimondi/url-to-png/security/advisories/GHSA-665w-mwrr-77q3

Restart Required: Yes

Instructions:

1. Stop the url-to-png service. 2. Update to version 2.0.3 using npm: 'npm update @jmondi/url-to-png'. 3. Restart the service.

🔧 Temporary Workarounds

No workarounds available

all

The vendor states no workarounds exist aside from upgrading to the patched version.

🧯 If You Can't Patch

  • Isolate the vulnerable service in a restricted network segment with no access to sensitive files
  • Implement strict file system permissions to limit what the application user can read

🔍 How to Verify

Check if Vulnerable:

Check package.json for @jmondi/url-to-png version. If version is less than 2.0.3, the system is vulnerable.

Check Version:

npm list @jmondi/url-to-png

Verify Fix Applied:

Verify the version is 2.0.3 or higher and test that file:// URLs are rejected with appropriate error messages.

📡 Detection & Monitoring

Log Indicators:

  • Failed attempts to access file:// URLs
  • Unusual file path patterns in URL parameters
  • Error logs showing file protocol rejection

Network Indicators:

  • HTTP requests containing file:// protocol in URL parameters
  • Unusual file path patterns in incoming requests

SIEM Query:

source="url-to-png" AND (url="*file://*" OR error="*file protocol*" OR status=400 AND message="*invalid protocol*")

🔗 References

📤 Share & Export