Information Exposure Affecting gatsby-transformer-remark package, versions <6.10.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.09% (40th 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-GATSBYTRANSFORMERREMARK-5671901
  • published 8 Jun 2023
  • disclosed 8 Jun 2023
  • credit Maxwell Garrett

How to fix?

Upgrade gatsby-transformer-remark to version 6.10.0 or higher.

Overview

gatsby-transformer-remark is a Gatsby transformer plugin for Markdown using the Remark library and ecosystem

Affected versions of this package are vulnerable to Information Exposure via local file inclusion in __file-code-frame or __original-stack-frame, when gatsby develop is in use and exposed to the internet.

NOTE: 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.

PoC

# Local File Inclusion in __file-code-frame
$ curl "http://127.0.0.1:8000/__file-code-frame?filePath=/etc/passwd&lineNumber=1"

# Local File Inclusion in __original-stack-frame
$ curl "http://127.0.0.1:8000/__original-stack-frame?moduleId=/etc/hosts&lineNumber=1&skipSourceMap=1"

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

5.3 medium