Information Exposure Affecting gatsby-plugin-sharp package, versions <4.25.1 >=5.0.0-next.0 <5.8.1


0.0
medium

Snyk CVSS

    Attack Complexity Low

    Threat Intelligence

    EPSS 0.08% (32nd percentile)
Expand this section
NVD
4.3 medium

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JS-GATSBYPLUGINSHARP-5425803
  • published 18 Apr 2023
  • disclosed 18 Apr 2023
  • credit Patrick Rombouts, Bart Veneman

How to fix?

Upgrade gatsby-plugin-sharp to version 4.25.1, 5.8.1 or higher.

Overview

gatsby-plugin-sharp is a low-level helper plugin generally used by other Gatsby plugins that exposes several image processing functions built on the Sharp image processing library.

Affected versions of this package are vulnerable to Information Exposure via path traversal, when running gatsby develop. By default this server 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.

PoC

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