CVE intelligence and bounded remediation

CVE-2022-25863 — Gatsbyjs Gatsby security vulnerability

Critical CVSS 9.8

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.

Severity
Critical
CVSS
9.8 (3.1)
Published
2022-06-10
CISA KEV
Not currently listed
Ecosystem
software/application
Weaknesses
CWE-502

Affected products

  • gatsbyjs / gatsby

Showing 1 representative product identities from 2 source matches. Confirm exact affected versions with the linked vendor and NVD evidence.

Matched remediation archetype

Unsafe deserialization and object reconstruction

This catalog composition supplies bounded fallback guidance. Explicitly reviewed curated workflows load with the complete record below.

Check exposure

  • Inventory serialization formats accepted from requests, queues, caches, files, cookies, and cross-service messages.
  • Trace whether untrusted input can select classes, types, callbacks, constructors, or object hooks during decoding.
  • Identify signing, schema validation, trust-boundary, and compatibility settings for each decoder.

Remediate safely

  • Replace native object deserialization with a data-only format and explicit schema validation.
  • If replacement is not immediate, use a safe decoder with a minimal type allowlist and disable polymorphic or executable hooks.
  • Update the affected library and add inert tests for unknown types, extra fields, malformed nesting, and unsigned data.

Authoritative sources

Complete CVE record and remediation plan

The detailed catalog view below loads this exact record, its source evidence, and the full seven-phase agentic change plan.