CVE-2023-22491
JavaScript vulnerability analysis and mitigation

Overview

The vulnerability (CVE-2023-22491) affects the gatsby-transformer-remark plugin versions prior to 5.25.1 and 6.3.2. The plugin was found to be vulnerable to JavaScript injection through its integration with the gray-matter npm package in its default configuration. This security issue was discovered and disclosed on January 11, 2023 (GitHub Advisory).

Technical details

The vulnerability stems from the gatsby-transformer-remark plugin passing unsanitized input to the gray-matter npm package when operating in data mode (querying MarkdownRemark nodes via GraphQL). The issue is particularly concerning when processing files with untrusted or unsanitized input. The vulnerability has been assigned a CVSS v3.1 score of 8.1 (High severity), with attack vector being Network, low attack complexity, low privileges required, and no user interaction needed (GitHub Advisory).

Impact

When exploited, this vulnerability allows injected JavaScript to execute in the context of the build server. The impact is significant with high confidentiality and integrity risks, though availability remains unaffected. A proof-of-concept exploit demonstrates the ability to execute system commands through child_process (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in gatsby-transformer-remark versions 5.25.1 and 6.3.2 by disabling the gray-matter JavaScript Frontmatter engine by default. A new option, JSFrontmatterEngine, has been introduced and is set to false by default. For users who must enable JSFrontmatterEngine, input must be sanitized before processing. For those using older versions, input sanitization is recommended as a workaround (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66456CRITICAL9.1
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-66457HIGH7.5
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-65849MEDIUM6.9
  • JavaScriptJavaScript
  • altcha
NoNoDec 08, 2025
CVE-2025-66202MEDIUM6.5
  • JavaScriptJavaScript
  • astro
NoYesDec 09, 2025
CVE-2025-14284MEDIUM5.1
  • JavaScriptJavaScript
  • @tiptap/extension-link
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management