{"answers":{"affected":"2 open source packages ship an affected version, including @jmondi/url-to-png.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-39918 exists.","fix":"Upgrade @jmondi/url-to-png to 2.1.2 or later.","what":"CVE-2024-39918 is a medium-severity path traversal vulnerability in jasonraimondi url-to-png, published on 15 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-39918 and fix it if it is affected.\n\nWhat it is: CVE-2024-39918 is a medium-severity path traversal vulnerability in jasonraimondi url-to-png, published on 15 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-39918 exists.\n\nAffected packages and fixed versions:\n- @jmondi/url-to-png (npm): affected all versions; fixed in 2.1.2\n- @jmondi/url-to-png (npm): affected all versions; fixed in 2.1.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-39918/ (Markdown: https://insights.sbomify.com/CVE-2024-39918/index.md)","id":"CVE-2024-39918","markdown":"https://insights.sbomify.com/CVE-2024-39918/index.md","name":"CVE-2024-39918","record":{"aliases":["GHSA-vvmv-wrvp-9gjr"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"URL to PNG library","requires_auth":"low_privilege","summary":"An attacker can exploit unsanitized input to store images in arbitrary server locations, potentially overwriting files or causing data modification.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":4.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"@jmondi/url-to-png is an open source URL to PNG utility featuring parallel rendering using Playwright for screenshots and with storage caching via Local, S3, or CouchDB. Input of the `ImageId` in the code is not sanitized and may lead to path traversal. This allows an attacker to store an image in an arbitrary location that the server has permission to access. This issue has been addressed in version 2.1.2 and all users are advised to upgrade. There are no known workarounds for this vulnerability.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Path Traveral in @jmondi/url-to-png","id":"CVE-2024-39918","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2024"},"n_packages":2,"n_references":3,"next":{"headline":"Capture screenshot of localhost web services (unauthenticated pages) in @jmondi/url-to-png","id":"CVE-2024-39919"},"packages":[{"ecosystem":"npm","fixed":["2.1.2"],"introduced":["0"],"last_affected":[],"package":"@jmondi/url-to-png","purl":null,"source":"GHSA-vvmv-wrvp-9gjr"},{"ecosystem":"npm","fixed":["2.1.2"],"introduced":["0"],"last_affected":[],"package":"@jmondi/url-to-png","purl":"pkg:npm/%40jmondi/url-to-png","source":"GHSA-vvmv-wrvp-9gjr"}],"prev":{"headline":"xrdp allows an ininite number of login attempts","id":"CVE-2024-39917"},"products":["url-to-png"],"published":"2024-07-15","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["jasonraimondi"]},"summary":"An attacker can exploit unsanitized input to store images in arbitrary server locations, potentially overwriting files or causing data modification.","url":"https://insights.sbomify.com/CVE-2024-39918/"}