{"id":"GHSA-mj46-r4gr-5x83","revision":null,"records":[{"revision":"e4159e7bd6bb42ca8faa924b8a3773c6","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2022-25863","aliases":[],"title":"Deserialization of Untrusted Data","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.","state":0,"publishedAt":"2022-06-10T20:00:19.275+00:00","modifiedAt":"2024-09-17T00:31:34.621+00:00","affected":[{"ecosystem":"Vendor product","name":"gatsby-plugin-mdx","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"gatsby-plugin-mdx\",\n                    \"vendor\": \"n/a\",\n                    \"versions\": [\n                        {\n                            \"lessThan\": \"2.14.1\",\n                            \"status\": \"affected\",\n                            \"version\": \"unspecified\",\n                            \"versionType\": \"custom\"\n                        },\n                        {\n                            \"lessThan\": \"unspecified\",\n                            \"status\": \"affected\",\n                            \"version\": \"3.0.0\",\n                            \"versionType\": \"custom\"\n                        },\n                        {\n                            \"lessThan\": \"3.15.2\",\n                            \"status\": \"affected\",\n                            \"version\": \"unspecified\",\n                            \"versionType\": \"custom\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N/E:P","score":8.1,"severity":"HIGH"}],"references":["https://snyk.io/vuln/SNYK-JS-GATSBYPLUGINMDX-2405699","https://drive.google.com/file/d/1EoCzbwTWOM8-fjvwMbH3bqcZ2iKksxTW/view?usp=sharing","https://github.com/gatsbyjs/gatsby/pull/35830","https://github.com/gatsbyjs/gatsby/pull/35830/commits/f214eb0694c61e348b2751cecd1aace2046bc46e"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2022-25863","license":"CVE Program Terms of Use","key":"cve-program:CVE-2022-25863","identifiers":["CVE-2022-25863"]},"retained":false,"historicalAffected":[]},{"revision":"75ea36aff2474004aa9090bc046ee91c","observedAt":"2026-11-12T01:05:05.784+00:00","statement":{"source":"euvd","id":"EUVD-2022-6094","aliases":["CVE-2022-25863","GHSA-mj46-r4gr-5x83"],"title":"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 sa…","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N/E:P","score":8.1,"severity":null}],"references":["https://snyk.io/vuln/SNYK-JS-GATSBYPLUGINMDX-2405699","https://drive.google.com/file/d/1EoCzbwTWOM8-fjvwMbH3bqcZ2iKksxTW/view?usp=sharing","https://github.com/gatsbyjs/gatsby/pull/35830","https://github.com/gatsbyjs/gatsby/pull/35830/commits/f214eb0694c61e348b2751cecd1aace2046bc46e"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2022-6094","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jun 10, 2022, 8:00:19 PM","dateUpdated":"Sep 17, 2024, 12:31:34 AM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2022-6094","identifiers":["EUVD-2022-6094","CVE-2022-25863","GHSA-mj46-r4gr-5x83"]},"retained":false,"historicalAffected":[]},{"revision":"e705445ee0394680bcdc6a065113c534","observedAt":"2026-10-24T20:17:12.83+00:00","statement":{"source":"nvd","id":"CVE-2022-25863","aliases":[],"title":"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 sa…","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.","state":0,"publishedAt":"2022-06-10T20:15:08.227+00:00","modifiedAt":"2026-09-29T15:50:31.907+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · report@snyk.io · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":8.1,"severity":"HIGH"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"severity":"CRITICAL"},{"system":"CVSS 2.0 · nvd@nist.gov · Primary","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"severity":"HIGH"}],"references":["https://drive.google.com/file/d/1EoCzbwTWOM8-fjvwMbH3bqcZ2iKksxTW/view?usp=sharing","https://github.com/gatsbyjs/gatsby/pull/35830","https://github.com/gatsbyjs/gatsby/pull/35830/commits/f214eb0694c61e348b2751cecd1aace2046bc46e","https://snyk.io/vuln/SNYK-JS-GATSBYPLUGINMDX-2405699"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2022-25863","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-502"],"productCriteria":["cpe:2.3:a:gatsbyjs:gatsby-plugin-mdx:*:*:*:*:*:node.js:*:*"],"sourceDates":{"published":"2022-06-10T20:15:08.227","lastModified":"2026-09-29T15:50:31.907"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2022-25863","identifiers":["CVE-2022-25863"]},"retained":false,"historicalAffected":[]},{"revision":"fddff48eddfb4e85acd3263921e6274b","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-mj46-r4gr-5x83","aliases":["CVE-2022-25863","SNYK-JS-GATSBYPLUGINMDX-2405699"],"title":"Unsanitized JavaScript code injection possible in gatsby-plugin-mdx","description":"### Impact\nThe gatsby-plugin-mdx plugin prior to versions 3.15.2 and 2.14.1 passes input through to the `gray-matter` npm package, which is vulnerable to JavaScript injection in its default configuration, unless input is sanitized.  The vulnerability is present when passing input in both webpack (MDX files in `src/pages` or MDX file imported as component in frontend / React code) and data mode (querying MDX nodes via GraphQL).  Injected JavaScript executes in the context of the build server.\n\nTo exploit this vulnerability untrusted/unsanitized input would need to be sourced or added into an MDX file.  The following MDX payload demonstrates a vulnerable configuration:\n```\n---js\n((require(\"child_process\")).execSync(\"id >> /tmp/rce\"))\n--- \n```\n\n### Patches\nA patch has been introduced in `gatsby-plugin-mdx@3.15.2` and `gatsby-plugin-mdx@2.14.1` which mitigates the issue by disabling the `gray-matter` JavaScript Frontmatter engine.  The patch introduces a new option, `JSFrontmatterEngine` which is set to `false` by default.  When setting `JSFrontmatterEngine` to `true`, input passed to `gatsby-plugin-mdx` must be sanitized before processing to avoid a security risk.  Warnings are displayed when enabling `JSFrontmatterEngine` to `true` or if it appears that the MDX input is attempting to use the Frontmatter engine.\n\n### Workarounds\nIf an older version of `gatsby-plugin-mdx` must be used, input passed into the plugin should be sanitized ahead of processing.\n\n**We encourage projects to upgrade to the latest major release branch for all Gatsby plugins to ensure the latest security updates and bug fixes are received in a timely manner.**\n\n### Credits\nWe would like to thank Snyk [snyk.io] for initially bringing the issue to our attention, as well as Feng Xiao and Zhongfu Su, who reported the issue to Snyk.\n\n### For more information\nEmail us at [security@gatsbyjs.com](mailto:security@gatsbyjs.com).\n","state":0,"publishedAt":"2022-06-03T22:32:06+00:00","modifiedAt":"2026-07-08T06:50:01.4803692+00:00","affected":[{"ecosystem":"npm","name":"gatsby-plugin-mdx","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.14.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"gatsby-plugin-mdx","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"3.0.0"},{"kind":"fixed","version":"3.15.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/gatsbyjs/gatsby/security/advisories/GHSA-mj46-r4gr-5x83","https://nvd.nist.gov/vuln/detail/CVE-2022-25863","https://github.com/gatsbyjs/gatsby/pull/35830","https://github.com/gatsbyjs/gatsby/pull/35830/commits/f214eb0694c61e348b2751cecd1aace2046bc46e","https://drive.google.com/file/d/1EoCzbwTWOM8-fjvwMbH3bqcZ2iKksxTW/view?usp=sharing","https://github.com/gatsbyjs/gatsby","https://snyk.io/vuln/SNYK-JS-GATSBYPLUGINMDX-2405699"],"sourceUrl":"https://github.com/advisories/GHSA-mj46-r4gr-5x83","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-mj46-r4gr-5x83","identifiers":["GHSA-mj46-r4gr-5x83","CVE-2022-25863","SNYK-JS-GATSBYPLUGINMDX-2405699"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-12T06:54:08.8081877+00:00","complete":true,"records":1779,"lastAttemptAt":"2026-11-12T06:54:08.8081877+00:00","lastSuccessAt":"2026-11-12T06:54:09.4926633+00:00","error":null,"lastVerifiedAt":"2026-11-12T06:54:09.4926642+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-64752486c567b55b31fb0d7225f5222bcd0019564ac0ac5f0649e242c7b19299-031557bd84075d0efeb8f81d38e7e201c5767c1ec5ad4deb9375464dfdb790d3","complete":true,"records":424595,"lastAttemptAt":"2026-11-12T06:53:59.6712569+00:00","lastSuccessAt":"2026-11-12T06:53:59.6124706+00:00","error":null,"lastVerifiedAt":"2026-11-12T06:53:59.6712569+00:00","snapshotPublishedAt":"2026-11-12T06:27:50+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-570328139368428ca550af1570d01579","complete":true,"records":13760,"lastAttemptAt":"2026-11-12T06:55:06.9273282+00:00","lastSuccessAt":"2026-11-12T06:55:06.923+00:00","error":null,"lastVerifiedAt":"2026-11-12T06:55:06.923+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13813,"expectedIdentifiers":13813,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-12T06:54:08.8081877+00:00","complete":true,"records":1097,"lastAttemptAt":"2026-11-12T06:54:08.8081877+00:00","lastSuccessAt":"2026-11-12T06:54:09.7509822+00:00","error":null,"lastVerifiedAt":"2026-11-12T06:54:09.7509833+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-5bd6a0be90c14da3820334c987af617f","complete":true,"records":13760,"lastAttemptAt":"2026-11-12T06:54:37.2126404+00:00","lastSuccessAt":"2026-11-12T06:54:37.209+00:00","error":null,"lastVerifiedAt":"2026-11-12T06:54:37.209+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13813,"expectedIdentifiers":13813,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-3562b6c78fd1bd0f0b55daf66a0926ae24f65e462df7f6d928caad458fc696bf","complete":true,"records":9947,"lastAttemptAt":"2026-11-12T06:54:07.7500838+00:00","lastSuccessAt":"2026-11-11T04:27:43.6877707+00:00","error":null,"lastVerifiedAt":"2026-11-12T06:54:07.7500838+00:00","snapshotPublishedAt":"2026-11-11T03:32:46+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-456002455e0ab94bb92c95476d4e6d175c104cd594749982afd96c893728ecbc","complete":true,"records":2010,"lastAttemptAt":"2026-11-12T06:54:05.0323741+00:00","lastSuccessAt":"2026-11-11T02:36:58.1276999+00:00","error":null,"lastVerifiedAt":"2026-11-12T06:54:05.0323741+00:00","snapshotPublishedAt":"2026-11-11T01:17:51+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-baa8362b4daf9e5f39d5563775a55935e7b442c0735d33274a921579ce4a0d66","complete":true,"records":3093,"lastAttemptAt":"2026-11-12T06:54:08.5688182+00:00","lastSuccessAt":"2026-11-11T13:00:02.5446881+00:00","error":null,"lastVerifiedAt":"2026-11-12T06:54:08.5688182+00:00","snapshotPublishedAt":"2026-11-11T12:47:47+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-eb5176d73e87a862c4cae7484f3fd31f7d170139114b3e99e25926d661f6435b","complete":true,"records":231700,"lastAttemptAt":"2026-11-12T06:54:05.6319464+00:00","lastSuccessAt":"2026-11-12T05:58:39.2691741+00:00","error":null,"lastVerifiedAt":"2026-11-12T06:54:05.6319464+00:00","snapshotPublishedAt":"2026-11-12T05:48:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}