{"cve":"CVE-2023-22491","nvd":{"published":"2023-01-13T19:15:12.407","modified":"2026-09-29T15:06:00.643","status":"Analyzed","description":"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 `gatsby-transformer-remark@5.25.1` and `gatsby-transformer-remark@6.3.2` 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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4},"cwes":["CWE-79","CWE-20","CWE-89"],"references":["https://github.com/gatsbyjs/gatsby/security/advisories/GHSA-7ch4-rr99-cqcw","https://github.com/gatsbyjs/gatsby/security/advisories/GHSA-7ch4-rr99-cqcw","https://github.com/gatsbyjs/gatsby/security/advisories/GHSA-7ch4-rr99-cqcw"],"products":["gatsbyjs:gatsby-transformer-remark"],"source":"nvd","synced_at":"2026-10-19T21:37:34.931465858+00:00"},"epss":{"cve":"CVE-2023-22491","score":0.00578,"percentile":0.47636,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-7ch4-rr99-cqcw","url":"https://osv.dev/vulnerability/GHSA-7ch4-rr99-cqcw","summary":"gatsby-transformer-remark has possible unsanitized JavaScript code injection","modified":"2026-09-10T03:49:51.023290486Z","packages":[{"ecosystem":"npm","name":"gatsby-transformer-remark","purl":"pkg:npm/gatsby-transformer-remark","ranges":[">=6.0.0 <6.3.2"],"fixed":["6.3.2"]},{"ecosystem":"npm","name":"gatsby-transformer-remark","purl":"pkg:npm/gatsby-transformer-remark","ranges":["<5.25.1"],"fixed":["5.25.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}