CVE-2023-22491: gatsby-transformer-remark has possible unsanitized JavaScript code injection
8.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.34309%
CWE
Published
1/11/2023
Updated
1/23/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
gatsby-transformer-remark | npm | >= 6.0.0, < 6.3.2 | 6.3.2 |
gatsby-transformer-remark | npm | < 5.25.1 | 5.25.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from gatsby-transformer-remark
's integration with gray-matter
's frontmatter parsing. Prior to patching, the plugin didn't disable gray-matter
's JavaScript engine (enabled by default), allowing execution of untrusted JS in Markdown frontmatter. The patch explicitly disabled this engine via JSFrontmatterEngine
: false. While no specific function names are provided in advisories, the core vulnerability exists in the gray-matter
integration point where frontmatter parsing occurs without JS engine disabling.