Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. gatsby
  4. ›
  5. CVE-2022-25863

CVE-2022-25863: Deserialization of Untrusted Data

June 10, 2022 (updated June 17, 2022)

The package gatsby-plugin-mdx before 2.14.1, from 3.0.0 and before 3.15.2 is vulnerable to Deserialization of Untrusted Data when passing input through to the gray-matter package, due to its default configurations that are missing input sanitization. Exploiting this vulnerability is possible when passing input in both webpack (MDX files in src/pages or MDX file imported as a component in frontend / React code) and data mode (querying MDX nodes via GraphQL). Workaround: If an older version of gatsby-plugin-mdx must be used, input passed into the plugin should be sanitized ahead of processing.

References

  • drive.google.com/file/d/1EoCzbwTWOM8-fjvwMbH3bqcZ2iKksxTW/view?usp=sharing
  • github.com/gatsbyjs/gatsby/pull/35830
  • github.com/gatsbyjs/gatsby/pull/35830/commits/f214eb0694c61e348b2751cecd1aace2046bc46e
  • nvd.nist.gov/vuln/detail/CVE-2022-25863
  • snyk.io/vuln/SNYK-JS-GATSBYPLUGINMDX-2405699

Code Behaviors & Features

Detect and mitigate CVE-2022-25863 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 2.14.1, all versions starting from 3.0.0 before 3.15.2

Fixed versions

  • 2.14.1
  • 3.15.2

Solution

Upgrade to version 2.14.1, 3.15.2, or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-502: Deserialization of Untrusted Data

Source file

npm/gatsby/CVE-2022-25863.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:18 +0000.