iterative / cml.dev

🔗 CML website and documentation
https://cml.dev
Apache License 2.0
12 stars 23 forks source link

fix(deps): update dependency gatsby-plugin-sharp to v5.8.1 [security] #473

Closed renovate[bot] closed 1 year ago

renovate[bot] commented 1 year ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
gatsby-plugin-sharp (source) 5.4.0 -> 5.8.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 ### [`v5.8.1`](https://togithub.com/gatsbyjs/gatsby/blob/HEAD/packages/gatsby-plugin-sharp/CHANGELOG.md#​581-httpsgithubcomgatsbyjsgatsbycommitsgatsby-plugin-sharp581packagesgatsby-plugin-sharp-2023-03-29) [Compare Source](https://togithub.com/gatsbyjs/gatsby/compare/gatsby-plugin-sharp@5.8.0...gatsby-plugin-sharp@5.8.1) ##### Bug Fixes - don't serve static assets that are not result of currently triggered deferred job [#​37796](https://togithub.com/gatsbyjs/gatsby/issues/37796) [#​37799](https://togithub.com/gatsbyjs/gatsby/issues/37799) ([5f44208](https://togithub.com/gatsbyjs/gatsby/commit/5f442081b227cc0879babb96858f970c4ce94c6b)) ### [`v5.8.0`](https://togithub.com/gatsbyjs/gatsby/blob/HEAD/packages/gatsby-plugin-sharp/CHANGELOG.md#​580-httpsgithubcomgatsbyjsgatsbycommitsgatsby-plugin-sharp580packagesgatsby-plugin-sharp-2023-03-21) [Compare Source](https://togithub.com/gatsbyjs/gatsby/compare/gatsby-plugin-sharp@5.7.0...gatsby-plugin-sharp@5.8.0) [🧾 Release notes](https://www.gatsbyjs.com/docs/reference/release-notes/v5.8) **Note:** Version bump only for package gatsby-plugin-sharp ### [`v5.7.0`](https://togithub.com/gatsbyjs/gatsby/blob/HEAD/packages/gatsby-plugin-sharp/CHANGELOG.md#​570-httpsgithubcomgatsbyjsgatsbycommitsgatsby-plugin-sharp570packagesgatsby-plugin-sharp-2023-02-21) [Compare Source](https://togithub.com/gatsbyjs/gatsby/compare/gatsby-plugin-sharp@5.6.0...gatsby-plugin-sharp@5.7.0) [🧾 Release notes](https://www.gatsbyjs.com/docs/reference/release-notes/v5.7) **Note:** Version bump only for package gatsby-plugin-sharp ### [`v5.6.0`](https://togithub.com/gatsbyjs/gatsby/blob/HEAD/packages/gatsby-plugin-sharp/CHANGELOG.md#​560-httpsgithubcomgatsbyjsgatsbycommitsgatsby-plugin-sharp560packagesgatsby-plugin-sharp-2023-02-07) [Compare Source](https://togithub.com/gatsbyjs/gatsby/compare/gatsby-plugin-sharp@5.5.0...gatsby-plugin-sharp@5.6.0) [🧾 Release notes](https://www.gatsbyjs.com/docs/reference/release-notes/v5.6) ##### Bug Fixes - update babel monorepo [#​37568](https://togithub.com/gatsbyjs/gatsby/issues/37568) ([13a0a9e](https://togithub.com/gatsbyjs/gatsby/commit/13a0a9e83dcb015b65dff6b73cdd5dea09c2988f)) ##### Chores - update dependency [@​types/sharp](https://togithub.com/types/sharp) to ^0.31.1 [#​37562](https://togithub.com/gatsbyjs/gatsby/issues/37562) ([e86d87c](https://togithub.com/gatsbyjs/gatsby/commit/e86d87c851ac5e09cf9eaff7a7500a64b55b6075)) ### [`v5.5.0`](https://togithub.com/gatsbyjs/gatsby/blob/HEAD/packages/gatsby-plugin-sharp/CHANGELOG.md#​550-httpsgithubcomgatsbyjsgatsbycommitsgatsby-plugin-sharp550packagesgatsby-plugin-sharp-2023-01-24) [Compare Source](https://togithub.com/gatsbyjs/gatsby/compare/gatsby-plugin-sharp@5.4.0...gatsby-plugin-sharp@5.5.0) [🧾 Release notes](https://www.gatsbyjs.com/docs/reference/release-notes/v5.5) ##### Chores - Upgrade some non-breaking major versions [#​37406](https://togithub.com/gatsbyjs/gatsby/issues/37406) ([2ea80c0](https://togithub.com/gatsbyjs/gatsby/commit/2ea80c02e464fe9306f6a1eccbb6c74983a76208))

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

â™» 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.



This PR has been generated by Mend Renovate. View repository job log here.

github-actions[bot] commented 1 year ago

Link Check Report

There were no links to check!