Read the docs
TI-2023-08740 Aliases CVE-2023-22491GHSA-7ch4-rr99-cqcw

gatsby-transformer-remark vulnerable to unsanitized JavaScript code injection

Priority HIGH 70CWE-20Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
SQL injection, Cross-site scripting
Confidentiality · integrity · availability
High · High · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-89 and CWE-79.

Summary

Gatsby is a free and open source framework based on React that helps developers build websites and apps. The gatsby-transformer-remark plugin prior to versions 5.25.1 and 6.3.2 passes input through to the `gray-matter` npm package, which is vulnerable to JavaScript injection in its default configuration, unless input is sanitized. The vulnerability is present in gatsby-transformer-remark when passing input in data mode (querying MarkdownRemark nodes via GraphQL). Injected JavaScript executes in the context of the build server. To exploit this vulnerability untrusted/unsanitized input would need to be sourced by or added into a file processed by gatsby-transformer-remark. A patch has been introduced in `[email protected]` and `[email protected]` which mitigates the issue by disabling the `gray-matter` JavaScript Frontmatter engine. As a workaround, if an older version of `gatsby-transformer-remark` must be used, input passed into the plugin should be sanitized ahead of processing. It is encouraged for 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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00578 47th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed gatsby (gatsbyjs): 6.3.2, 5.25.1gatsby-transformer-remark (npm): 6.3.2, 5.25.1

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
gatsbyjsgatsby6.0.0 to before 6.3.2; before 5.25.16.3.2, 5.25.1Patch availableCNA
—gatsby-transformer-remark (npm)6.0.0 to before 6.3.26.3.2Patch availableGHSA-7ch4-rr99-cqcw
—gatsby-transformer-remark (npm)before 5.25.15.25.1Patch availableGHSA-7ch4-rr99-cqcw
  • gatsby Vendorgatsbyjs Affected 6.0.0 to before 6.3.2; before 5.25.1 Fixed in 6.3.2, 5.25.1 Patch available CNA
  • gatsby-transformer-remark (npm) Vendor— Affected 6.0.0 to before 6.3.2 Fixed in 6.3.2 Patch available GHSA-7ch4-rr99-cqcw
  • gatsby-transformer-remark (npm) Vendor— Affected before 5.25.1 Fixed in 5.25.1 Patch available GHSA-7ch4-rr99-cqcw

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:gatsbyjs:gatsby-transformer-remark:*:*:*:*:*:node.js:*:*before 5.25.1; 6.0.0 to before 6.3.2Vulnerablegatsbyjs
  • cpe:2.3:a:gatsbyjs:gatsby-transformer-remark:*:*:*:*:*:node.js:*:* Versions before 5.25.1; 6.0.0 to before 6.3.2 Vulnerable ·gatsbyjs

Remediation

  • Fix · CNA gatsby (gatsbyjs) Fixed in 6.3.2, 5.25.1
  • Fix · GHSA-7ch4-rr99-cqcw gatsby-transformer-remark (npm) Fixed in 6.3.2 Advisory →
  • Fix · GHSA-7ch4-rr99-cqcw gatsby-transformer-remark (npm) Fixed in 5.25.1 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-22491
  2. 2026-10-03 Alias added: GHSA-7ch4-rr99-cqcw

References

Sources