Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 20, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
gatsby-plugin-sharp (source) 4.21.0 -> 4.25.1 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2023-30548

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.


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

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: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

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

β™» Rebasing: Whenever PR becomes conflicted, 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 has been generated by Mend Renovate. View repository job log here.

@vercel
Copy link

vercel bot commented Apr 20, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
giuem-com ❌ Failed (Inspect) Sep 21, 2023 3:30pm

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

None yet

0 participants