Home / gatsbyjs / gatsby / CVE-2023-22491
CVE-2023-22491: is it exploited, and which versions of gatsbyjs gatsby are affected and fixed?
CVE-2023-22491 is a SQL injection vulnerability in gatsbyjs gatsby. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 13:38 UTC). Affected: gatsby-transformer-remark from 6.0.0 before 6.3.2 and gatsby-transformer-remark before 5.25.1 (GitHub advisory GHSA-7ch4-rr99-cqcw). Fixed in 6.3.2 and 5.25.1 (GitHub advisory GHSA-7ch4-rr99-cqcw). Severity: High (8.1, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 13:38 UTC, CVE record November 19, 2026, 07:13 UTC and NVD November 19, 2026, 07:42 UTC.
What is CVE-2023-22491?
gatsby-transformer-remark vulnerable to unsanitized JavaScript code injection
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.
From the CVE record by GitHub_M, last updated March 11, 2025, 13:34 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| gatsbyjs | gatsby | >= 6.0.0, < 6.3.2 < 5.25.1 |
As the CVE record by GitHub_M states it, last updated March 11, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| npm | gatsby-transformer-remark | >= 6.0.0, < 6.3.2 | 6.3.2 | GHSA-7ch4-rr99-cqcw |
| npm | gatsby-transformer-remark | < 5.25.1 | 5.25.1 | GHSA-7ch4-rr99-cqcw |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated January 23, 2023. Summary: gatsby-transformer-remark has possible unsanitized JavaScript code injection.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| gatsbyjs | gatsby-transformer-remark | before 5.25.1 | application |
| gatsbyjs | gatsby-transformer-remark | from 6.0.0 before 6.3.2 | application |
NVD analysis (status Analyzed), last modified September 29, 2026, 15:06 UTC.
How severe is CVE-2023-22491?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 8.1 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N | GitHub_M |
| Medium 5.4 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2023-22491 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: poc; automatable: no; technical impact: total (CISA ADP, March 11, 2025)
- EPSS
- 0.60% probability of exploitation activity in the next 30 days, percentile 50.4 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
- CWE-20 Improper Input Validation
- CWE-79 Improper Neutralization of Input During Web Page Generation
Where are the vendor advisories and references?
- https://github.com/gatsbyjs/gatsby/security/advisories/GHSA-7ch4-rr99-cqcw x_refsource_CONFIRM
When was it published, and where is the official record?
- Reserved
- December 29, 2022
- Published
- January 13, 2023, 18:05 UTC
- CVE record updated
- March 11, 2025, 13:34 UTC by GitHub_M
- NVD
- Analyzed, last modified September 29, 2026, 15:06 UTC
- Last checked
- CVE list November 19, 2026, 07:13 UTC; NVD November 19, 2026, 07:42 UTC; KEV December 3, 2026, 13:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect gatsby?
- Jun 7, 2023CVE-2023-34238 gatsbyjs gatsby: path traversal (reading or writing files outside the intended folder)
- Apr 17, 2023CVE-2023-30548 gatsbyjs gatsby: path traversal (reading or writing files outside the intended folder)
- Jul 15, 2021CVE-2021-32770 gatsbyjs gatsby: information disclosure
Questions about CVE-2023-22491
Is CVE-2023-22491 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 13:38 UTC. FIRST's EPSS gives it a 0.60% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of gatsbyjs gatsby are affected by CVE-2023-22491?
gatsby-transformer-remark from 6.0.0 before 6.3.2 and gatsby-transformer-remark before 5.25.1, per the GitHub advisory GHSA-7ch4-rr99-cqcw. The tables above give every range the sources list.
Which version fixes CVE-2023-22491?
6.3.2 and 5.25.1, per the GitHub advisory GHSA-7ch4-rr99-cqcw. Check the vendor's advisory before you rely on it.
How severe is CVE-2023-22491?
High (8.1, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2023-22491?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.