# CVE-2023-30548: Path traversal vulnerability in gatsby-plugin-sharp

- Severity: Medium 4.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.79%, higher than 53% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-04-17T20:43:43.033Z
- Modified: 2026-09-29T15:50:53.420Z
- Also known as: GHSA-h2pm-378c-pcxx
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- gatsbyjs gatsby: < 4.25.1; >= 5.0.0, < 5.8.1
- gatsby-plugin-sharp (npm): from 5.0.0 before 5.8.1; before 4.25.1
- gatsbyjs gatsby-plugin-sharp: before 4.25.1; from 5.0.0 before 5.8.1

## Every score

- GitHub_M: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`

## References

- <https://github.com/gatsbyjs/gatsby/security/advisories/GHSA-h2pm-378c-pcxx> (exploit, mitigation, vendor-advisory, web)
- <https://github.com/gatsbyjs/gatsby/commit/5f442081b227cc0879babb96858f970c4ce94c6b> (patch, web)
- <https://github.com/gatsbyjs/gatsby/commit/dcf88ed01df2c26e0c93a41e1a2a840076d8247e> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-30548> (advisory)
- <https://github.com/gatsbyjs/gatsby> (package)

## Sources

- CVE List: [CVE-2023-30548](https://www.cve.org/CVERecord?id=CVE-2023-30548), CVE Terms of Use, modified 2025-02-05
- GitHub Advisory Database: [GHSA-h2pm-378c-pcxx](https://github.com/advisories/GHSA-h2pm-378c-pcxx), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2023-30548](https://nvd.nist.gov/vuln/detail/CVE-2023-30548), Public domain, modified 2026-09-29

---

Page: https://cve.day/CVE-2023-30548 · Whole record: https://cve.day/CVE-2023-30548.json · Rebuilt by cve.day 2026-11-25T22:58:23.548Z
