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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.3
- **CVSS:** 4.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.79% (percentile 53, 2026-11-26)
- **CWE:** CWE-22
- **Aliases:** GHSA-h2pm-378c-pcxx
- **Published:** 2023-04-17T20:43:43.033Z
- **Modified:** 2026-09-29T15:50:53.420Z

## Who should check

- Projects that depend on npm package gatsby-plugin-sharp (\>= 5.0.0, \< 5.8.1)
- Anyone running gatsbyjs gatsby \< 4.25.1; \>= 5.0.0, \< 5.8.1

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

## Affected and fixed versions

- npm `gatsby-plugin-sharp`: affected \>= 5.0.0, \< 5.8.1; fixed 5.8.1, 4.25.1 (osv)
- gatsbyjs gatsby: \< 4.25.1; \>= 5.0.0, \< 5.8.1 (cvelist)

## Mitigation

- Upgrade gatsby-plugin-sharp to one of 5.8.1, 4.25.1 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-30548. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-30548.md
Affected: gatsby-plugin-sharp >= 5.0.0, < 5.8.1
Fixed in: 5.8.1, 4.25.1

Steps:
1. Search this machine and project for gatsby-plugin-sharp (npm), gatsbyjs gatsby: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-30548 being exploited?

There is no confirmed exploitation: CVE-2023-30548 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.79% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-30548?

Medium: CVSS 4.3 (v3.1, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2023-30548?

gatsby-plugin-sharp \>= 5.0.0, \< 5.8.1.

### Is there a fix for CVE-2023-30548?

Yes. Fixed in 5.8.1, 4.25.1. Upgrade gatsby-plugin-sharp to one of 5.8.1, 4.25.1 (or later in the same release line).

### How do I check if I'm affected by CVE-2023-30548?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/gatsbyjs/gatsby/security/advisories/GHSA-h2pm-378c-pcxx>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-30548>
- patch: <https://github.com/gatsbyjs/gatsby/commit/5f442081b227cc0879babb96858f970c4ce94c6b>
- patch: <https://github.com/gatsbyjs/gatsby/commit/dcf88ed01df2c26e0c93a41e1a2a840076d8247e>
- other: <https://github.com/gatsbyjs/gatsby>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-30548>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-h2pm-378c-pcxx> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-30548> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-30548>
