Vulnerability · Published Jun 10, 2022 · Assigned by snyk

CVE-2022-25863Deserialization of Untrusted Data

High 8.1

In plain English

A high-severity security flaw in gatsby-plugin-mdx. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.0% (higher than 81% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)8.1High
Exploit odds (30 days)2.0%top 19.2% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

The package gatsby-plugin-mdx before 2.14.1, from 3.0.0 and before 3.15.2 are 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npmgatsby-plugin-mdx2.14.1GHSA-mj46-r4gr-5x83
npmgatsby-plugin-mdx3.15.2GHSA-mj46-r4gr-5x83

Affected products (as reported)

VendorProductVersions
n/a gatsby-plugin-mdx unspecified – before 2.14.13.0.0 – before unspecifiedunspecified – before 3.15.2

References