Skip to content

fix(deps): update dependency gatsby-plugin-sharp to v4.25.1 [security] - #309

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-gatsby-plugin-sharp-vulnerability
Open

fix(deps): update dependency gatsby-plugin-sharp to v4.25.1 [security]#309
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-gatsby-plugin-sharp-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Apr 20, 2023

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
gatsby-plugin-sharp (source) 4.21.04.25.1 age confidence

Path traversal vulnerability in gatsby-plugin-sharp

CVE-2023-30548 / GHSA-h2pm-378c-pcxx

More information

Details

Impact

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

The following steps can be used to reproduce the vulnerability:


##### Create a new Gatsby project, and install gatsby-plugin-sharp
$ npm init gatsby
$ cd my-gatsby-site
$ npm install gatsby-plugin-sharp

##### Add the plugin to gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-sharp`,
    },
  ]
}

##### Start the Gatsby develop server
$ gatsby develop

##### Execute the path traversal vulnerability
$ curl "http://127.0.0.1:8000/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd"

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

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 Patrick Rombouts and Bart Veneman [drukwerkdeal.nl] for bringing the issue to our attention.

For more information

Email us at security@gatsbyjs.com.

Severity

  • CVSS Score: 4.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

gatsbyjs/gatsby (gatsby-plugin-sharp)

v4.25.1

Compare Source

v4.25.0

Compare Source

v4.24.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-plugin-sharp

4.23.1 (2022-09-22)

Note: Version bump only for package gatsby-plugin-sharp

v4.23.1

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-plugin-sharp

4.23.1 (2022-09-22)

Note: Version bump only for package gatsby-plugin-sharp

v4.23.0

Compare Source

🧾 Release notes

Chores

v4.22.0

Compare Source

🧾 Release notes

Chores

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@vercel

vercel Bot commented Apr 20, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
giuem-com Error Error Jun 1, 2026 10:52pm

@renovate renovate Bot changed the title fix(deps): update dependency gatsby-plugin-sharp to v4.25.1 [security] fix(deps): update dependency gatsby-plugin-sharp to v4.25.1 [security] - autoclosed Sep 21, 2023
@renovate renovate Bot closed this Sep 21, 2023
@renovate
renovate Bot deleted the renovate/npm-gatsby-plugin-sharp-vulnerability branch September 21, 2023 12:24
@renovate renovate Bot changed the title fix(deps): update dependency gatsby-plugin-sharp to v4.25.1 [security] - autoclosed fix(deps): update dependency gatsby-plugin-sharp to v4.25.1 [security] Sep 21, 2023
@renovate renovate Bot reopened this Sep 21, 2023
@renovate
renovate Bot restored the renovate/npm-gatsby-plugin-sharp-vulnerability branch September 21, 2023 15:29
@renovate
renovate Bot force-pushed the renovate/npm-gatsby-plugin-sharp-vulnerability branch from 3e57392 to 4632819 Compare September 21, 2023 15:30
@renovate
renovate Bot force-pushed the renovate/npm-gatsby-plugin-sharp-vulnerability branch from 4632819 to ceb9673 Compare August 10, 2025 15:09
@renovate
renovate Bot force-pushed the renovate/npm-gatsby-plugin-sharp-vulnerability branch from ceb9673 to f5c0089 Compare November 10, 2025 15:44
@renovate
renovate Bot force-pushed the renovate/npm-gatsby-plugin-sharp-vulnerability branch from f5c0089 to a038a2e Compare November 18, 2025 10:39
@renovate
renovate Bot force-pushed the renovate/npm-gatsby-plugin-sharp-vulnerability branch from a038a2e to 16ae289 Compare December 3, 2025 18:14
@renovate
renovate Bot force-pushed the renovate/npm-gatsby-plugin-sharp-vulnerability branch from 16ae289 to a51e6e4 Compare December 31, 2025 16:33
@renovate
renovate Bot force-pushed the renovate/npm-gatsby-plugin-sharp-vulnerability branch from a51e6e4 to e728017 Compare February 12, 2026 16:07
@renovate
renovate Bot force-pushed the renovate/npm-gatsby-plugin-sharp-vulnerability branch from e728017 to 291222e Compare March 5, 2026 17:30
@renovate renovate Bot changed the title fix(deps): update dependency gatsby-plugin-sharp to v4.25.1 [security] fix(deps): update dependency gatsby-plugin-sharp to v4.25.1 [security] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate
renovate Bot deleted the renovate/npm-gatsby-plugin-sharp-vulnerability branch March 27, 2026 01:25
@renovate renovate Bot changed the title fix(deps): update dependency gatsby-plugin-sharp to v4.25.1 [security] - autoclosed fix(deps): update dependency gatsby-plugin-sharp to v4.25.1 [security] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate
renovate Bot force-pushed the renovate/npm-gatsby-plugin-sharp-vulnerability branch from affb136 to 291222e Compare March 30, 2026 17:33
@renovate
renovate Bot force-pushed the renovate/npm-gatsby-plugin-sharp-vulnerability branch from 291222e to affb136 Compare March 30, 2026 17:34
@renovate
renovate Bot force-pushed the renovate/npm-gatsby-plugin-sharp-vulnerability branch from affb136 to 34fd5e2 Compare May 28, 2026 18:17
@renovate
renovate Bot force-pushed the renovate/npm-gatsby-plugin-sharp-vulnerability branch from 34fd5e2 to 7f44036 Compare June 1, 2026 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants