# CVE-2022-25863: Deserialization of Untrusted Data

- Severity: High 8.1 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.01%, higher than 81% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 3 links below, marked "exploit"
- Published: 2022-06-03T22:32:06.000Z
- Modified: 2026-09-29T15:50:31.907Z
- Also known as: GHSA-mj46-r4gr-5x83, SNYK-JS-GATSBYPLUGINMDX-2405699
- Weaknesses: CWE-502
- Assigned by: snyk

## 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.

(As written by CVE List.)

## Affected

- gatsby-plugin-mdx: from unspecified before 2.14.1; from 3.0.0 before unspecified; from unspecified before 3.15.2
- gatsby-plugin-mdx (npm): before 2.14.1; from 3.0.0 before 3.15.2
- gatsbyjs gatsby-plugin-mdx: before 2.14.1; from 3.0.0 before 3.15.2

## Every score

- snyk: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N/E:P`
- GitHub: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://snyk.io/vuln/SNYK-JS-GATSBYPLUGINMDX-2405699> (exploit, third-party-advisory, web)
- <https://drive.google.com/file/d/1EoCzbwTWOM8-fjvwMbH3bqcZ2iKksxTW/view?usp=sharing> (exploit, third-party-advisory, web)
- <https://github.com/gatsbyjs/gatsby/pull/35830> (exploit, patch, third-party-advisory, web)
- <https://github.com/gatsbyjs/gatsby/pull/35830/commits/f214eb0694c61e348b2751cecd1aace2046bc46e> (patch, third-party-advisory, web)
- <https://github.com/gatsbyjs/gatsby/security/advisories/GHSA-mj46-r4gr-5x83> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-25863> (advisory)
- <https://github.com/gatsbyjs/gatsby> (package)

## Sources

- CVE List: [CVE-2022-25863](https://www.cve.org/CVERecord?id=CVE-2022-25863), CVE Terms of Use, modified 2024-09-17
- GitHub Advisory Database: [GHSA-mj46-r4gr-5x83](https://github.com/advisories/GHSA-mj46-r4gr-5x83), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2022-25863](https://nvd.nist.gov/vuln/detail/CVE-2022-25863), Public domain, modified 2026-09-29

---

Page: https://cve.day/CVE-2022-25863 · Whole record: https://cve.day/CVE-2022-25863.json · Rebuilt by cve.day 2026-11-25T22:58:12.218Z
