{"id":"CVE-2024-39919","aliases":["GHSA-342q-2mc2-5gmp"],"url":"https://o3.security/vulnerability/CVE-2024-39919","summary":"Capture screenshot of localhost web services (unauthenticated pages) in @jmondi/url-to-png","details":"### Summary\n\nThe 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.\n\nThe 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.\n\nThe 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.\n\nUnless 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.)\n\nThis is marked as a `LOW` since the maintainer is not sure if this is a vulnerability, but it's still best to highlight it. :) \n\n### PoC\n\nHave a service like so running locally:\n\n```js\nconst http = require(\"http\")\n\nconst server = http.createServer((req, res) => {\n  console.log(\"Received headers:\", req.headers)\n  res.writeHead(200, { \"Content-Type\": \"text/plain\" })\n  res.end(\"Something private! But Hello from Server 2 :)\")\n})\n\nserver.listen(3001, () => {\n  console.log(\"Server two running on http://localhost:3001\")\n})\n```\n\nRun the package in dev mode, `pnpm dev`. Feed these URLs:\n\n```\nhttp://localhost:3089/?url=http://[::]:3001&width=4000\nhttp://localhost:3089/?url=http://localhost:3001&width=4000\nhttp://localhost:3089/?url=http://127.0.01:3001&width=4000\n```\n\n<img width=\"622\" alt=\"image\" src=\"https://github.com/jasonraimondi/url-to-png/assets/42532003/21f1c883-ba00-4a15-83b8-922484fa4c2b\">\n\n\n\n### Impact\nDisclose internal web services?\n","published":"2024-07-15T19:53:23.192Z","modified":"2026-08-12T03:51:38.663558468Z","cvss":{"score":3.1,"severity":"LOW","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N"},"epss":{"score":0.0037,"percentile":0.29766,"asOf":"2026-07-31"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"@jmondi/url-to-png","fixedVersion":"2.1.2"}],"fix":{"url":"https://github.com/jasonraimondi/url-to-png/commit/f62ff40403ffa1781459d6be8d97b8035888c00c","label":"jasonraimondi/url-to-png@f62ff40"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/39xxx/CVE-2024-39919.json"},{"type":"ADVISORY","url":"https://github.com/jasonraimondi/url-to-png/security/advisories/GHSA-342q-2mc2-5gmp"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39919"},{"type":"FIX","url":"https://github.com/jasonraimondi/url-to-png/commit/f62ff40403ffa1781459d6be8d97b8035888c00c"},{"type":"PACKAGE","url":"https://github.com/jasonraimondi/url-to-png"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:38.663558468Z"}}