{"answers":{"affected":"4 open source packages ship an affected version, including gatsby-plugin-sharp. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-30548 exists.","fix":"Upgrade gatsby-plugin-sharp to a fixed version for your release line: 4.25.1 or 5.8.1.","what":"CVE-2023-30548 is a medium-severity path traversal vulnerability in gatsbyjs gatsby, published on 17 Apr 2023. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-30548 and fix it if it is affected.\n\nWhat it is: CVE-2023-30548 is a medium-severity path traversal vulnerability in gatsbyjs gatsby, published on 17 Apr 2023. 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-2023-30548 exists.\n\nAffected packages and fixed versions:\n- gatsby-plugin-sharp (npm): affected all versions; fixed in 4.25.1\n- gatsby-plugin-sharp (npm): affected all versions; fixed in 4.25.1\n- gatsby-plugin-sharp (npm): affected from 5.0.0; fixed in 5.8.1\n- gatsby-plugin-sharp (npm): affected from 5.0.0; fixed in 5.8.1\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-2023-30548/ (Markdown: https://insights.sbomify.com/CVE-2023-30548/index.md)","id":"CVE-2023-30548","markdown":"https://insights.sbomify.com/CVE-2023-30548/index.md","name":"CVE-2023-30548","record":{"aliases":["CLSA-2026-1792938613","GHSA-h2pm-378c-pcxx"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":true,"product_category":"Gatsby image plugin","requires_auth":"low_privilege","summary":"Attackers can read arbitrary files if the Gatsby develop server is exposed to untrusted networks due to a path traversal flaw in the image processing plugin.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"gatsby-plugin-sharp","vendor":"gatsbyjs"}],"cvss":{"score":4.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"gatsby-plugin-sharp is a plugin for the gatsby framework which exposes functions built on the Sharp image processing library. The gatsby-plugin-sharp plugin prior to versions 5.8.1 and 4.25.1 contains a path traversal vulnerability exposed when running the Gatsby develop server (`gatsby develop`). It should be noted that by default gatsby develop is only accessible via the localhost 127.0.0.1, and one would need to intentionally expose the server to other interfaces to exploit this vulnerability by using server options such as --host 0.0.0.0, -H 0.0.0.0, or the GATSBY_HOST=0.0.0.0 environment variable. Attackers exploiting this vulnerability will have read access to all files within the scope of the server process. A patch has been introduced in gatsby-plugin-sharp@5.8.1 and gatsby-plugin-sharp@4.25.1 which mitigates the issue by ensuring that included paths remain within the project directory. As stated above, by default gatsby develop is only exposed to the localhost 127.0.0.1. For those using the develop server in the default configuration no risk is posed. If other ranges are required, preventing the develop server from being exposed to untrusted interfaces or IP address ranges would mitigate the risk from this vulnerability. Users are non the less encouraged to upgrade to a safe version.","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 traversal vulnerability in gatsby-plugin-sharp","id":"CVE-2023-30548","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2023"},"n_packages":4,"n_references":3,"next":{"headline":"Unpatched extfs vulnerabilities are exploitable through suid-mode Apptainer","id":"CVE-2023-30549"},"packages":[{"ecosystem":"npm","fixed":["4.25.1"],"introduced":["0"],"last_affected":[],"package":"gatsby-plugin-sharp","purl":null,"source":"GHSA-h2pm-378c-pcxx"},{"ecosystem":"npm","fixed":["4.25.1"],"introduced":["0"],"last_affected":[],"package":"gatsby-plugin-sharp","purl":"pkg:npm/gatsby-plugin-sharp","source":"GHSA-h2pm-378c-pcxx"},{"ecosystem":"npm","fixed":["5.8.1"],"introduced":["5.0.0"],"last_affected":[],"package":"gatsby-plugin-sharp","purl":null,"source":"GHSA-h2pm-378c-pcxx"},{"ecosystem":"npm","fixed":["5.8.1"],"introduced":["5.0.0"],"last_affected":[],"package":"gatsby-plugin-sharp","purl":"pkg:npm/gatsby-plugin-sharp","source":"GHSA-h2pm-378c-pcxx"}],"prev":{"headline":"Sandbox Escape in vm2","id":"CVE-2023-30547"},"products":["gatsby"],"published":"2023-04-17","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":"US public information, NVD API terms","name":"NVD"},{"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":"2025-02-05","vendors":["gatsbyjs"]},"summary":"Attackers can read arbitrary files if the Gatsby develop server is exposed to untrusted networks due to a path traversal flaw in the image processing plugin.","url":"https://insights.sbomify.com/CVE-2023-30548/"}