NodeJS/gatsby/4.23.0-alpha-preview-gh-api-2.43


Blazing fast modern site generator for React

https://www.npmjs.com/package/gatsby
MIT

1 Security Vulnerabilities

Gatsby develop server has Local File Inclusion vulnerability

Published date: 2023-06-09T22:52:01Z
CVE: CVE-2023-34238
Links:

Impact

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

The following steps can be used to reproduce the vulnerability:

# Create a new Gatsby project
$ npm init gatsby
$ cd my-gatsby-site

# Start the Gatsby develop server
$ gatsby develop

# Execute the Local File Inclusion vulnerability in __file-code-frame
$ curl "http://127.0.0.1:8000/__file-code-frame?filePath=/etc/passwd&lineNumber=1"

# Execute the Local File Inclusion vulnerability in __original-stack-frame
$ curl "http://127.0.0.1:8000/__original-stack-frame?moduleId=/etc/hosts&lineNumber=1&skipSourceMap=1"

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.

Patches

A patch has been introduced in gatsby@5.9.1 and gatsby@4.25.7 which mitigates the issue.

Workarounds

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.

We encourage projects to upgrade to the latest major release branch for all Gatsby plugins to ensure the latest security updates and bug fixes are received in a timely manner.

Credits

We would like to thank Maxwell Garrett of Assetnote for bringing the __file-code-frame issue to our attention.

For more information

Email us at security@gatsbyjs.com.

Affected versions: ["5.1.0-next.0", "5.0.0", "5.0.1", "5.2.0-next.0", "5.1.0", "5.2.0-next.1", "5.3.0-next.0", "5.2.0", "5.3.0-next.1", "5.3.0-next.2", "5.3.0-next.3", "5.3.0-next.4", "5.4.0-next.0", "5.3.0", "5.4.0-next.1", "5.3.1", "5.4.0-next.2", "5.3.2", "5.3.3", "5.4.0-next.3", "5.5.0-next.0", "5.4.0", "5.4.1", "5.5.0-alpha-initial-webhook-body.30", "5.5.0-alpha-initial-webhook-body.31", "5.4.2", "5.5.0-next.1", "5.6.0-next.0", "5.5.0", "5.6.0-next.1", "5.6.0-next.2", "5.7.0-next.0", "5.6.0", "5.7.0-next.1", "5.6.1", "5.8.0-next.0", "5.7.0", "5.8.0-next.1", "5.8.0-next.2", "5.8.0-alpha-rspack.4", "5.8.0-next.3", "5.8.0-alpha-react-profiling-env.8", "5.9.0-next.0", "5.8.0", "5.8.0-touchnodes-memdebug.17", "5.8.0-touchnodes-memdebug2.17", "5.8.0-touchnodes-memdebug2.19", "5.8.0-inference-memdebug.22", "5.8.0-inference-memdebug.26", "5.9.0-next.1", "5.8.1", "5.9.0-next.2", "5.9.0-next.3", "5.9.0-image-cdn-configurable.4", "5.9.0-touch-nodes-optout.49", "5.9.0-reduce-contentful-mem-usage.36", "5.9.0-reduce-contentful-mem-usage.39", "5.9.0-reduce-contentful-mem-usage.38", "5.9.0", "5.9.0-lmdb-remapchunks.40", "5.9.0-lmdb-remapchunks.41", "5.9.0-alpha-cg-tailwind.23"]
Secure versions: [5.0.0-alpha-v5.24, 5.0.0-alpha-v5.25, 5.0.0-alpha-v5.11, 5.0.0-alpha-v5.16, 5.0.0-alpha-v5.d20221005t111511.16, 5.0.0-alpha-v5.d20221007t081809.41, 5.0.0-alpha-v5.d20221010t183635.51, 5.0.0-alpha-v5.d20221012t101120.57, 5.0.0-next.0, 5.0.0-next.1, 5.0.0-next.2, 5.0.0-next.3, 5.0.0-next.4, 5.0.0-next.5, 5.0.0-next.6, 5.0.0-next.7, 5.0.0-next.8, 5.0.0-next.9, 5.0.0-next.10, 5.0.0-next.11, 5.0.0-next.12, 5.0.0-next.13, 5.0.0-next.14, 5.0.0-next.15, 5.0.0-next.16, 5.0.0-alpha-drupal-proxyurl.11, 5.10.0-next.0, 5.10.0-next.1, 5.10.0-next.2, 5.10.0-next.3, 5.10.0-next.4, 5.10.0-infer-block-less.5, 5.10.0-infer-block-less.6, 5.10.0-infer-block-less.7, 5.10.0-infer-block-less.8, 5.10.0-infer-block-less.11, 5.10.0-infer-block-less.12, 4.25.7, 5.9.1, 5.10.0-infer-block-less.13, 5.10.0-gatsby-gc.14, 5.10.0-gatsby-gc.15, 5.10.0-gatsby-gc.16, 5.10.0-gatsby-gc.17, 5.10.0-gatsby-gc.18, 5.11.0-next.0, 5.10.0, 5.10.0-gatsby-gc.19, 5.10.0-gatsby-gc.20, 5.11.0-next.1, 5.10.0-alpha-adapters.89, 5.10.0-alpha-adapters.94, 5.10.0-alpha-adapters.96, 5.11.0-touch-nodes-fix.4, 5.12.0-next.0, 5.11.0, 5.10.0-alpha-adapters.130, 5.12.0-next.1, 5.10.0-alpha-adapters.141, 5.10.0-alpha-adapters.142, 5.10.0-alpha-adapters.153, 5.10.0-alpha-adapters.155, 5.10.0-alpha-adapters.156, 5.10.0-alpha-adapters.158, 5.10.0-alpha-adapters.159, 5.10.0-alpha-adapters.164, 5.10.0-alpha-adapters.165, 5.13.0-next.0, 5.13.0-next.1, 5.12.0, 5.12.1, 5.12.2, 5.12.3, 5.12.4, 5.12.5, 5.12.6, 5.12.7, 5.12.8, 5.12.9, 5.13.0-alpha-alt-image-cdn.38, 5.13.0-next.2, 5.12.10, 5.12.11, 5.13.0-next.3, 5.12.12, 5.13.0-alpha-fix-pnpm.16, 5.13.0-alpha-fix-pnpm.17, 5.14.0-next.0, 5.13.0, 4.25.8, 5.13.0-alpha-fix-pnpm.21, 5.14.0-alpha-fix-ssr-linkfs.5, 5.13.1, 5.14.0-alpha-fix-parcel-segfault.11, 5.14.0-next.1, 5.14.0-next.2, 5.14.0-next.3, 5.13.2, 5.14.0-alpha-ssr-writestream.3, 5.13.3, 5.14.0-canary.7, 5.14.0-next.4, 5.14.0-ctf-next.0, 5.13.4, 5.14.0-alpha-gatsby.6, 5.14.0-alpha-gatsby.9, 5.13.5, 4.25.9]
Recommendation: Update to version 5.14.0-next.4.

2970 Other Versions

Version License Security Released
5.14.0-next.4 MIT 2024-02-20 - 18:46 3 months
5.14.0-next.3 MIT 2024-01-23 - 08:06 4 months
5.14.0-next.2 MIT 2024-01-05 - 08:18 5 months
5.14.0-next.1 MIT 2024-01-04 - 11:46 5 months
5.14.0-ctf-next.0 MIT 2024-03-08 - 11:43 2 months
5.14.0-next.0 MIT 2023-12-15 - 10:49 5 months
5.14.0-canary.7 MIT 2024-02-16 - 19:16 3 months
5.14.0-alpha-gatsby.9 MIT 2024-04-29 - 19:24 21 days
5.14.0-alpha-fix-ssr-linkfs.5 MIT 2023-12-21 - 12:29 5 months
5.14.0-alpha-ssr-writestream.3 MIT 2024-01-25 - 10:07 4 months
5.14.0-alpha-fix-parcel-segfault.11 MIT 2024-01-02 - 11:41 5 months
5.14.0-alpha-gatsby.6 MIT 2024-04-26 - 15:09 24 days
5.13.5 MIT 2024-05-17 - 13:58 4 days
5.13.4 MIT 2024-04-10 - 18:27 about 1 month
5.13.3 MIT 2024-01-25 - 21:41 4 months
5.13.2 MIT 2024-01-23 - 13:13 4 months
5.13.1 MIT 2023-12-22 - 09:22 5 months
5.13.0 MIT 2023-12-18 - 11:02 5 months
5.13.0-next.3 MIT 2023-12-04 - 14:11 6 months
5.13.0-next.2 MIT 2023-11-16 - 11:09 6 months
5.13.0-next.1 MIT 2023-08-22 - 13:29 9 months
5.13.0-next.0 MIT 2023-07-25 - 08:28 10 months
5.13.0-alpha-alt-image-cdn.38 MIT 2023-11-03 - 12:26 7 months
5.13.0-alpha-fix-pnpm.17 MIT 2023-12-15 - 06:40 5 months
5.13.0-alpha-fix-pnpm.16 MIT 2023-12-14 - 17:44 5 months
5.13.0-alpha-fix-pnpm.21 MIT 2023-12-20 - 11:29 5 months
5.12.12 MIT 2023-12-07 - 14:54 6 months
5.12.11 MIT 2023-11-22 - 11:16 6 months
5.12.10 MIT 2023-11-21 - 11:39 6 months
5.12.9 MIT 2023-10-26 - 11:06 7 months
5.12.8 MIT 2023-10-20 - 11:49 7 months
5.12.7 MIT 2023-10-17 - 10:04 7 months
5.12.6 MIT 2023-10-09 - 12:50 7 months
5.12.5 MIT 2023-09-27 - 07:31 8 months
5.12.4 MIT 2023-09-05 - 13:20 9 months
5.12.3 MIT 2023-08-28 - 12:50 9 months
5.12.2 MIT 2023-08-28 - 08:34 9 months
5.12.1 MIT 2023-08-24 - 11:24 9 months
5.12.0 MIT 2023-08-24 - 11:04 9 months
5.12.0-next.1 MIT 2023-07-03 - 13:26 11 months
5.12.0-next.0 MIT 2023-06-15 - 05:46 11 months
5.11.0 MIT 2023-06-15 - 09:40 11 months
5.11.0-next.1 MIT 2023-06-05 - 05:57 12 months
5.11.0-touch-nodes-fix.4 MIT 2023-06-14 - 22:46 11 months
5.11.0-next.0 MIT 2023-05-16 - 07:53 about 1 year
5.10.0 MIT 2023-05-16 - 08:14 about 1 year
5.10.0-next.4 MIT 2023-05-03 - 11:07 about 1 year
5.10.0-next.3 MIT 2023-04-27 - 14:18 about 1 year
5.10.0-next.2 MIT 2023-04-27 - 06:03 about 1 year
5.10.0-next.1 MIT 2023-04-19 - 13:08 about 1 year
5.10.0-infer-block-less.7 MIT 2023-05-05 - 21:19 about 1 year
5.10.0-infer-block-less.11 MIT 2023-05-08 - 22:47 about 1 year
5.10.0-infer-block-less.6 MIT 2023-05-05 - 20:28 about 1 year
5.10.0-next.0 MIT 2023-04-18 - 07:53 about 1 year
5.10.0-infer-block-less.13 MIT 2023-05-09 - 16:44 about 1 year
5.10.0-infer-block-less.8 MIT 2023-05-08 - 21:24 about 1 year
5.10.0-infer-block-less.5 MIT 2023-05-05 - 18:59 about 1 year
5.10.0-infer-block-less.12 MIT 2023-05-09 - 02:53 about 1 year
5.10.0-gatsby-gc.14 MIT 2023-05-15 - 17:55 about 1 year
5.10.0-gatsby-gc.19 MIT 2023-05-16 - 15:37 about 1 year
5.10.0-gatsby-gc.15 MIT 2023-05-15 - 19:12 about 1 year
5.10.0-gatsby-gc.18 MIT 2023-05-16 - 01:14 about 1 year
5.10.0-gatsby-gc.20 MIT 2023-05-16 - 15:44 about 1 year
5.10.0-gatsby-gc.17 MIT 2023-05-15 - 23:50 about 1 year
5.10.0-gatsby-gc.16 MIT 2023-05-15 - 20:05 about 1 year
5.10.0-alpha-adapters.156 MIT 2023-07-11 - 16:19 10 months
5.10.0-alpha-adapters.141 MIT 2023-07-03 - 14:38 11 months
5.10.0-alpha-adapters.158 MIT 2023-07-12 - 08:11 10 months
5.10.0-alpha-adapters.155 MIT 2023-07-11 - 15:59 10 months
5.10.0-alpha-adapters.153 MIT 2023-07-11 - 11:19 10 months
5.10.0-alpha-adapters.142 MIT 2023-07-04 - 07:37 11 months
5.10.0-alpha-adapters.130 MIT 2023-06-30 - 07:10 11 months
5.10.0-alpha-adapters.89 MIT 2023-06-14 - 08:24 11 months
5.10.0-alpha-adapters.159 MIT 2023-07-12 - 10:36 10 months
5.10.0-alpha-adapters.96 MIT 2023-06-14 - 15:24 11 months
5.10.0-alpha-adapters.165 MIT 2023-07-14 - 10:45 10 months
5.10.0-alpha-adapters.94 MIT 2023-06-14 - 14:05 11 months
5.10.0-alpha-adapters.164 MIT 2023-07-13 - 11:08 10 months
5.9.1 MIT 2023-05-09 - 07:55 about 1 year
5.9.0 MIT 1 2023-04-18 - 10:18 about 1 year
5.9.0-next.3 MIT 1 2023-04-06 - 07:31 about 1 year
5.9.0-next.2 MIT 1 2023-03-30 - 11:13 about 1 year
5.9.0-next.1 MIT 1 2023-03-28 - 10:08 about 1 year
5.9.0-touch-nodes-optout.49 MIT 1 2023-04-12 - 22:00 about 1 year
5.9.0-reduce-contentful-mem-usage.38 MIT 1 2023-04-17 - 20:10 about 1 year
5.9.0-reduce-contentful-mem-usage.36 MIT 1 2023-04-17 - 17:30 about 1 year
5.9.0-next.0 MIT 1 2023-03-21 - 08:49 about 1 year
5.9.0-reduce-contentful-mem-usage.39 MIT 1 2023-04-17 - 19:37 about 1 year
5.9.0-lmdb-remapchunks.41 MIT 1 2023-04-20 - 23:18 about 1 year
5.9.0-lmdb-remapchunks.40 MIT 1 2023-04-20 - 22:10 about 1 year
5.9.0-alpha-cg-tailwind.23 MIT 1 2023-05-09 - 14:52 about 1 year
5.9.0-image-cdn-configurable.4 MIT 1 2023-04-11 - 21:13 about 1 year
5.8.1 MIT 1 2023-03-29 - 11:43 about 1 year
5.8.0 MIT 1 2023-03-21 - 09:30 about 1 year
5.8.0-next.3 MIT 1 2023-03-14 - 09:47 about 1 year
5.8.0-next.2 MIT 1 2023-03-07 - 14:28 about 1 year
5.8.0-next.1 MIT 1 2023-02-22 - 14:45 about 1 year
5.8.0-inference-memdebug.26 MIT 1 2023-03-23 - 22:38 about 1 year
5.8.0-touchnodes-memdebug.17 MIT 1 2023-03-21 - 23:40 about 1 year
5.8.0-touchnodes-memdebug2.17 MIT 1 2023-03-22 - 16:31 about 1 year