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

Threat Intelligence

EPSS
0.07% (32nd 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 Learn

Learn about Information Exposure vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-GATSBYPLUGINSHARP-5425803
  • published18 Apr 2023
  • disclosed18 Apr 2023
  • creditPatrick Rombouts, Bart Veneman

Introduced: 18 Apr 2023

CVE-2023-30548  (opens in a new tab)
CWE-22  (opens in a new tab)

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