fix(deps): update dependency gatsby-plugin-mdx to v2 [security] #195
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.10.1
->^2.0.0
GitHub Vulnerability Alerts
CVE-2022-25863
Impact
The 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 insrc/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.To 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:
Patches
A patch has been introduced in
gatsby-plugin-mdx@3.15.2
andgatsby-plugin-mdx@2.14.1
which mitigates the issue by disabling thegray-matter
JavaScript Frontmatter engine. The patch introduces a new option,JSFrontmatterEngine
which is set tofalse
by default. When settingJSFrontmatterEngine
totrue
, input passed togatsby-plugin-mdx
must be sanitized before processing to avoid a security risk. Warnings are displayed when enablingJSFrontmatterEngine
totrue
or if it appears that the MDX input is attempting to use the Frontmatter engine.Workarounds
If an older version of
gatsby-plugin-mdx
must be used, input passed into the plugin should be sanitized ahead of processing.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.
Credits
We 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.
For more information
Email us at security@gatsbyjs.com.
Release Notes
gatsbyjs/gatsby (gatsby-plugin-mdx)
v2.14.1
Compare Source
v2.14.0
Compare Source
🧾 Release notes
Bug Fixes
Chores
@babel/runtime
dependencies #32954 (401b358)v2.13.0
Compare Source
🧾 Release notes
Chores
v2.12.0
Compare Source
🧾 Release notes
Chores
v2.11.0
Compare Source
🧾 Release notes
Bug Fixes
2.10.1 (2021-07-26)
Bug Fixes
v2.10.1
Compare Source
Bug Fixes
v2.10.0
Compare Source
🧾 Release notes
Chores
v2.9.0
Compare Source
🧾 Release notes
Features
Chores
v2.8.0
Compare Source
🧾 Release notes
Chores
2.7.1 (2021-06-10)
Chores
v2.7.1
Compare Source
Chores
v2.7.0
Compare Source
🧾 Release notes
Chores
v2.6.0
Compare Source
🧾 Release notes
Bug Fixes
2.5.1 (2021-05-19)
Bug Fixes
v2.5.1
Compare Source
Bug Fixes
v2.5.0
Compare Source
🧾 Release notes
Bug Fixes
v2.4.0
Compare Source
🧾 Release notes
Bug Fixes
Chores
v2.3.0
Compare Source
🧾 Release notes
Bug Fixes
v2.2.0
Compare Source
🧾 Release notes
Bug Fixes
v2.1.0
Compare Source
🧾 Release notes
Bug Fixes
Chores
2.0.1 (2021-03-11)
Bug Fixes
v2.0.1
Compare Source
Bug Fixes
v2.0.0
Compare Source
🧾 Release notes
Bug Fixes
Other Changes
1.10.1 (2021-02-24)
Note: Version bump only for package gatsby-plugin-mdx
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.