Security mailing lists by PureSourceCode

CVE-2022-25863

CRITICAL 9.8CVSS 3.1

Unsanitized JavaScript code injection possible in gatsby-plugin-mdx

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.

Published
10 Jun 2022
Last modified
29 Sep 2026
Assigned by
report@snyk.io
NVD status
Analyzed
Weakness
CWE-502
Also known as
GHSA-mj46-r4gr-5x83SNYK-JS-GATSBYPLUGINMDX-2405699
Sources
NVDJSONOSV GHSA-mj46-r4gr-5x83JSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 CRITICAL 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD report@snyk.io (Secondary) CVSS 3.1 HIGH 8.1 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
OSV GitHub CVSS 3.1 HIGH 8.1 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
NVD nvd@nist.gov (Primary) CVSS 2.0 HIGH 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD gatsbyjs gatsby-plugin-mdx
cpe:2.3:a:gatsbyjs:gatsby-plugin-mdx:*:*:*:*:*:node.js:*:*
< 2.14.1 2.14.1
NVD gatsbyjs gatsby-plugin-mdx
cpe:2.3:a:gatsbyjs:gatsby-plugin-mdx:*:*:*:*:*:node.js:*:*
>= 3.0.0, < 3.15.2 3.15.2
OSV npm gatsby-plugin-mdx < 2.14.1 2.14.1
OSV npm gatsby-plugin-mdx >= 3.0.0, < 3.15.2 3.15.2

References

History

  • 25 Nov 2026 20:34 UTC · NVD: first stored (published 10 Jun 2022)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 3 Jun 2022)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.