Skip to content

fix(deps): update dependency gatsby-plugin-mdx to v2 [security]#97

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-gatsby-plugin-mdx-vulnerability
Open

fix(deps): update dependency gatsby-plugin-mdx to v2 [security]#97
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-gatsby-plugin-mdx-vulnerability

Conversation

@renovate
Copy link
Copy Markdown

@renovate renovate Bot commented Jun 18, 2022

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
gatsby-plugin-mdx (source) ^1.2.6^2.0.0 age confidence

Unsanitized JavaScript code injection possible in gatsby-plugin-mdx

CVE-2022-25863 / GHSA-mj46-r4gr-5x83

More information

Details

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

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:

---js
((require("child_process")).execSync("id >> /tmp/rce"))
--- 
Patches

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

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.

Severity

  • CVSS Score: 8.1 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

gatsbyjs/gatsby (gatsby-plugin-mdx)

v2.14.1

Compare Source

v2.14.0

Compare Source

🧾 Release notes

Bug Fixes
Chores

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

🧾 Release notes

Bug Fixes
2.10.1 (2021-07-26)
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

🧾 Release notes

Chores
2.7.1 (2021-06-10)
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

🧾 Release notes

Bug Fixes
2.5.1 (2021-05-19)
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
  • fix html field resolver to work with webpack@​5 (0a6c6eb)
  • update lodash monorepo to ^4.17.21 #​29382 (9fd287b)
Chores
2.0.1 (2021-03-11)
Bug Fixes
  • fix html field resolver to work with webpack@​5 (b7d82da)

v2.0.1

Compare Source

🧾 Release notes

Bug Fixes
  • fix html field resolver to work with webpack@​5 (0a6c6eb)
  • update lodash monorepo to ^4.17.21 #​29382 (9fd287b)
Chores
2.0.1 (2021-03-11)
Bug Fixes
  • fix html field resolver to work with webpack@​5 (b7d82da)

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

v1.10.1

Compare Source

🧾 Release notes

Bug Fixes
Other Changes
1.10.1 (2021-02-24)

Note: Version bump only for package gatsby-plugin-mdx

v1.10.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-plugin-mdx

v1.9.0

Compare Source

🧾 Release notes

Bug Fixes
Performance Improvements

v1.8.0

Compare Source

🧾 Release notes

Performance Improvements
1.7.1 (2020-12-23)

Note: Version bump only for package gatsby-plugin-mdx

v1.7.1

Compare Source

🧾 Release notes

Performance Improvements
1.7.1 (2020-12-23)

Note: Version bump only for package gatsby-plugin-mdx

v1.7.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-plugin-mdx

v1.6.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-plugin-mdx

v1.5.0

Compare Source

🧾 Release notes

Chores
Other Changes

v1.4.0

Compare Source

🧾 Release notes

Performance Improvements

v1.3.1

Compare Source

v1.3.0

Compare Source

Features

1.2.53 (2020-11-02)

Bug Fixes

1.2.52 (2020-10-28)

Note: Version bump only for package gatsby-plugin-mdx

1.2.51 (2020-10-22)

Note: Version bump only for package gatsby-plugin-mdx

1.2.50 (2020-10-21)

Bug Fixes

1.2.49 (2020-10-20)

Performance Improvements
  • implement shouldOnCreateNode for all our plugins/benchmarks (#​27545) (df914d9)

1.2.48 (2020-10-19)

Note: Version bump only for package gatsby-plugin-mdx

1.2.47 (2020-10-16)

Note: Version bump only for package gatsby-plugin-mdx

1.2.46 (2020-10-08)

Note: Version bump only for package gatsby-plugin-mdx

1.2.45 (2020-10-07)

Bug Fixes
  • gatsby-plugin-mdx: babel.transform requires filename field now (#​27305) (8e07dfd)

1.2.44 (2020-10-06)

Note: Version bump only for package gatsby-plugin-mdx

1.2.43 (2020-10-01)

Note: Version bump only for package gatsby-plugin-mdx

1.2.42 (2020-09-28)

Note: Version bump only for package gatsby-plugin-mdx

1.2.41 (2020-09-24)

Bug Fixes
  • gatsby-plugin-mdx: Fix not passing file path to remark plugins (#​26914) (5d39594)

1.2.40 (2020-09-15)

Note: Version bump only for package gatsby-plugin-mdx

1.2.39 (2020-09-09)

Bug Fixes

1.2.38 (2020-09-07)

Note: Version bump only for package gatsby-plugin-mdx

1.2.37 (2020-08-28)

Note: Version bump only for package gatsby-plugin-mdx

1.2.36 (2020-08-26)

Note: Version bump only for package gatsby-plugin-mdx

1.2.35 (2020-08-24)

Note: Version bump only for package gatsby-plugin-mdx

1.2.34 (2020-08-05)

Note: Version bump only for package gatsby-plugin-mdx

1.2.33 (2020-08-03)

Bug Fixes

1.2.32 (2020-08-03)

Bug Fixes

1.2.31 (2020-07-31)

Performance Improvements

1.2.30 (2020-07-28)

Note: Version bump only for package gatsby-plugin-mdx

1.2.29 (2020-07-24)

Note: Version bump only for package gatsby-plugin-mdx

1.2.28 (2020-07-21)

Note: Version bump only for package gatsby-plugin-mdx

1.2.27 (2020-07-17)

Bug Fixes
Performance Improvements
  • gatsby-plugin-mdx: drop another babel step during sourcing (#​25757) (6d0c791)

1.2.26 (2020-07-15)

Performance Improvements

1.2.25 (2020-07-09)

Bug Fixes
  • gatsby-plugin-mdx: ignore anything after an import in mdx (#​25639) (9858528)

1.2.24 (2020-07-09)

Note: Version bump only for package gatsby-plugin-mdx

1.2.23 (2020-07-09)

Performance Improvements
  • gatsby-plugin-mdx: prevent babel parse step at sourcing time (#​25437) (760845a)

1.2.22 (2020-07-02)

Note: Version bump only for package gatsby-plugin-mdx

1.2.21 (2020-07-01)

Note: Version bump only for package gatsby-plugin-mdx

1.2.20 (2020-07-01)

Note: Version bump only for package gatsby-plugin-mdx

1.2.19 (2020-06-29)

Bug Fixes
  • gatsby-plugin-mdx: set childOf extension for Mdx type definition (#​25112) (49c0929)

1.2.18 (2020-06-24)

Note: Version bump only for package gatsby-plugin-mdx

1.2.17 (2020-06-22)

Note: Version bump only for package gatsby-plugin-mdx

1.2.16 (2020-06-19)

Note: Version bump only for package gatsby-plugin-mdx

1.2.15 (2020-06-09)

Note: Version bump only for package gatsby-plugin-mdx

1.2.14 (2020-06-02)

Note: Version bump only for package gatsby-plugin-mdx

1.2.13 (2020-05-28)

Bug Fixes

1.2.12 (2020-05-22)

Note: Version bump only for package gatsby-plugin-mdx

1.2.11 (2020-05-20)

Note: Version bump only for package gatsby-plugin-mdx

1.2.10 (2020-05-20)

Note: Version bump only for package gatsby-plugin-mdx

1.2.9 (2020-05-19)

Note: Version bump only for package gatsby-plugin-mdx

1.2.8 (2020-05-18)

Note: Version bump only for package gatsby-plugin-mdx

1.2.7 (2020-05-13)

Note: Version bump only for package gatsby-plugin-mdx

1.2.6 (2020-05-05)

Note: Version bump only for package gatsby-plugin-mdx

1.2.5 (2020-05-04)

Note: Version bump only for package gatsby-plugin-mdx

1.2.4 (2020-04-29)

Note: Version bump only for package gatsby-plugin-mdx

1.2.2 (2020-04-29)

Note: Version bump only for package gatsby-plugin-mdx

1.2.1 (2020-04-28)

Bug Fixes

v1.2.53

Compare Source

Features

1.2.53 (2020-11-02)

Bug Fixes

1.2.52 (2020-10-28)

Note: Version bump only for package gatsby-plugin-mdx

1.2.51 (2020-10-22)

Note: Version bump only for package gatsby-plugin-mdx

1.2.50 (2020-10-21)

Bug Fixes

1.2.49 (2020-10-20)

Performance Improvements
  • implement shouldOnCreateNode for all our plugins/benchmarks (#​27545) (df914d9)

1.2.48 (2020-10-19)

Note: Version bump only for package gatsby-plugin-mdx

1.2.47 (2020-10-16)

Note: Version bump only for package gatsby-plugin-mdx

1.2.46 (2020-10-08)

Note: Version bump only for package gatsby-plugin-mdx

1.2.45 (2020-10-07)

Bug Fixes
  • gatsby-plugin-mdx: babel.transform requires filename field now (#​27305) (8e07dfd)

1.2.44 (2020-10-06)

Note: Version bump only for package gatsby-plugin-mdx

1.2.43 (2020-10-01)

Note: Version bump only for package gatsby-plugin-mdx

1.2.42 (2020-09-28)

Note: Version bump only for package gatsby-plugin-mdx

1.2.41 (2020-09-24)

Bug Fixes
  • gatsby-plugin-mdx: Fix not passing file path to remark plugins (#​26914) (5d39594)

1.2.40 (2020-09-15)

Note: Version bump only for package gatsby-plugin-mdx

1.2.39 (2020-09-09)

Bug Fixes

1.2.38 (2020-09-07)

Note: Version bump only for package gatsby-plugin-mdx

1.2.37 (2020-08-28)

Note: Version bump only for package gatsby-plugin-mdx

1.2.36 (2020-08-26)

Note: Version bump only for package gatsby-plugin-mdx

1.2.35 (2020-08-24)

Note: Version bump only for package gatsby-plugin-mdx

1.2.34 (2020-08-05)

Note: Version bump only for package gatsby-plugin-mdx

1.2.33 (2020-08-03)

Bug Fixes

1.2.32 (2020-08-03)

Bug Fixes

1.2.31 (2020-07-31)

Performance Improvements

1.2.30 (2020-07-28)

Note: Version bump only for package gatsby-plugin-mdx

1.2.29 (2020-07-24)

Note: Version bump only for package gatsby-plugin-mdx

1.2.28 (2020-07-21)

Note: Version bump only for package gatsby-plugin-mdx

1.2.27 (2020-07-17)

Bug Fixes
Performance Improvements
  • gatsby-plugin-mdx: drop another babel step during sourcing (#​25757) (6d0c791)

1.2.26 (2020-07-15)

Performance Improvements

1.2.25 (2020-07-09)

Bug Fixes
  • gatsby-plugin-mdx: ignore anything after an import in mdx (#​25639) (9858528)

1.2.24 (2020-07-09)

Note: Version bump only for package gatsby-plugin-mdx

1.2.23 (2020-07-09)

Performance Improvements
  • gatsby-plugin-mdx: prevent babel parse step at sourcing time (#​25437) (760845a)

1.2.22 (2020-07-02)

Note: Version bump only for package gatsby-plugin-mdx

1.2.21 (2020-07-01)

Note: Version bump only for package gatsby-plugin-mdx

1.2.20 (2020-07-01)

Note: Version bump only for package gatsby-plugin-mdx

1.2.19 (2020-06-29)

Bug Fixes
  • gatsby-plugin-mdx: set childOf extension for Mdx type definition (#​25112) (49c0929)

1.2.18 (2020-06-24)

Note: Version bump only for package gatsby-plugin-mdx

1.2.17 (2020-06-22)

Note: Version bump only for package gatsby-plugin-mdx

1.2.16 (2020-06-19)

Note: Version bump only for package gatsby-plugin-mdx

1.2.15 (2020-06-09)

Note: Version bump only for package gatsby-plugin-mdx

1.2.14 (2020-06-02)

Note: Version bump only for package gatsby-plugin-mdx

1.2.13 (2020-05-28)

Bug Fixes

1.2.12 (2020-05-22)

Note: Version bump only for package gatsby-plugin-mdx

1.2.11 (2020-05-20)

Note: Version bump only for package gatsby-plugin-mdx

1.2.10 (2020-05-20)

Note: Version bump only for package gatsby-plugin-mdx

1.2.9 (2020-05-19)

Note: Version bump only for package gatsby-plugin-mdx

[1.2.8](https://redirect.github.com

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot changed the title fix(deps): update dependency gatsby-plugin-mdx to v2 [security] fix(deps): update dependency gatsby-plugin-mdx to v2 [security] - autoclosed Jul 26, 2023
@renovate renovate Bot closed this Jul 26, 2023
@renovate renovate Bot deleted the renovate/npm-gatsby-plugin-mdx-vulnerability branch July 26, 2023 07:35
@renovate renovate Bot changed the title fix(deps): update dependency gatsby-plugin-mdx to v2 [security] - autoclosed fix(deps): update dependency gatsby-plugin-mdx to v2 [security] Jul 26, 2023
@renovate renovate Bot reopened this Jul 26, 2023
@renovate renovate Bot restored the renovate/npm-gatsby-plugin-mdx-vulnerability branch July 26, 2023 10:29
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from 7550574 to 554c94d Compare July 26, 2023 10:29
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch 2 times, most recently from 6d2ce99 to 22115cf Compare August 13, 2025 13:41
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from 22115cf to 40e135f Compare August 19, 2025 19:42
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from 40e135f to a6c3120 Compare August 31, 2025 11:02
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from a6c3120 to d395bf1 Compare September 25, 2025 20:25
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from d395bf1 to d65efd5 Compare October 21, 2025 13:58
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from d65efd5 to 3d88879 Compare November 11, 2025 00:58
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from 3d88879 to ca3d414 Compare November 18, 2025 13:51
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from ca3d414 to 773dd8d Compare December 3, 2025 17:52
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from 773dd8d to 3843a86 Compare December 31, 2025 17:14
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from 3843a86 to 81e70d4 Compare January 8, 2026 18:12
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from 81e70d4 to ad5d771 Compare January 19, 2026 20:01
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from ad5d771 to 182c8c5 Compare February 2, 2026 21:15
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch 2 times, most recently from f85c7b0 to 82e43fe Compare February 17, 2026 19:57
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from 82e43fe to c610ee4 Compare March 5, 2026 19:53
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from c610ee4 to 4d5b665 Compare March 13, 2026 14:49
@renovate renovate Bot changed the title fix(deps): update dependency gatsby-plugin-mdx to v2 [security] fix(deps): update dependency gatsby-plugin-mdx to v2 [security] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate renovate Bot deleted the renovate/npm-gatsby-plugin-mdx-vulnerability branch March 27, 2026 01:25
@renovate renovate Bot changed the title fix(deps): update dependency gatsby-plugin-mdx to v2 [security] - autoclosed fix(deps): update dependency gatsby-plugin-mdx to v2 [security] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from 854f8d3 to 4d5b665 Compare March 30, 2026 21:17
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch 2 times, most recently from 854f8d3 to c95599c Compare April 1, 2026 19:54
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from c95599c to 925621b Compare April 8, 2026 20:05
@renovate renovate Bot changed the title fix(deps): update dependency gatsby-plugin-mdx to v2 [security] fix(deps): update dependency gatsby-plugin-mdx to v2 [security] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
@renovate renovate Bot changed the title fix(deps): update dependency gatsby-plugin-mdx to v2 [security] - autoclosed fix(deps): update dependency gatsby-plugin-mdx to v2 [security] Apr 27, 2026
@renovate renovate Bot reopened this Apr 27, 2026
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch 3 times, most recently from 2d39233 to f82667c Compare April 29, 2026 19:04
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from f82667c to 8e70d5e Compare May 12, 2026 12:04
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from 8e70d5e to b6474aa Compare May 18, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants