@jmondi/url-to-png enables capture screenshot of localhost web services (unauthenticated pages)
Summary
The maintainer been contemplating whether FTP or other protocols could serve as useful functionalities, but there may not be a practical reason for it since we are utilizing headless Chrome to capture screenshots. The argument is based on the assumption that this package can function as a service.
The package includes an ALLOW_LIST where the host can specify which services the user is permitted to capture screenshots of. By default, capturing screenshots of web services running on localhost, 127.0.0.1, or the [::] is allowed.
The maintainer is of the opinion that the package should also have a blacklist due to a potential vulnerability (or rather design oversight). If someone hosts this on a server, users could then capture screenshots of other web services running locally.
Unless this is strictly for web pages. Something similar here: https://github.com/follow-redirects/follow-redirects/issues/235 (localhost is intended for end users or hosts to deny, and the package is for HTTP/HTTPS.)
This is marked as a LOW since the maintainer is not sure if this is a vulnerability, but it's still best to highlight it. :)
PoC
Have a service like so running locally:
const http = require("http")
const server = http.createServer((req, res) => {
console.log("Received headers:", req.headers)
res.writeHead(200, { "Content-Type": "text/plain" })
res.end("Something private! But Hello from Server 2 :)")
})
server.listen(3001, () => {
console.log("Server two running on http://localhost:3001")
})
Run the package in dev mode, pnpm dev. Feed these URLs:
http://localhost:3089/?url=http://[::]:3001&width=4000
http://localhost:3089/?url=http://localhost:3001&width=4000
http://localhost:3089/?url=http://127.0.01:3001&width=4000
Impact
Disclose internal web services?
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| npm-Paket | @jmondi/url-to-png | < 2.1.2 | 2.1.2 |
Verweise
- CVSS-Vektor
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N- Schwäche (CWE)
CWE-200- Plattform
- npm
- Paket
@jmondi/url-to-png- Veröffentlicht
- 15.07.2024
- Aktualisiert
- 11.10.2026 10:22
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-342q-2mc2-5gmp - CC BY 4.0
Schwachstellenhistorie: @jmondi/url-to-png
Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 3
- Erste → letzte
- 06.2024 07.2024
- Ohne Fix
- 0
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Mittel 3
Veröffentlichungen pro Jahr
- 2024: 3
- 2025: 0
- 2026: 0
-
@jmondi/url-to-png enables capture screenshot of localhost web services (unauthenticated pages) dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.