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


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.08% (35th percentile)

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

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
4.3 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    Low
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    Low
  • Integrity (I)
    None
  • Availability (A)
    None
Expand this section

NVD

4.3 medium