CVE-2023-30548
Path traversal vulnerability in gatsby-plugin-sharp
Also known as GHSA-h2pm-378c-pcxx
Mitigation
- Upgrade gatsby-plugin-sharp to one of 5.8.1, 4.25.1 (or later in the same release line).
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
Vulnerability facts
- Affected
- gatsby-plugin-sharp >= 5.0.0, < 5.8.1
- Fixed in
- 5.8.1, 4.25.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 4.3 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:NOpen in CVSS calculator
Show all 8 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
- EPSS
- 0.79% chance of exploitation in 30 days (percentile 53, 2026-11-26)
- CWE
- CWE-22
- Modified
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
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm gatsby-plugin-sharp | >= 5.0.0, < 5.8.1 | 5.8.1, 4.25.1 | osv |
| gatsbyjs gatsby | < 4.25.1; >= 5.0.0, < 5.8.1 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
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.
References
Vendor advisories
Patches
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.