Skip to content

fix: update dependency gatsby-plugin-mdx to ^3.15.2 [security]#188

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

fix: update dependency gatsby-plugin-mdx to ^3.15.2 [security]#188
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/npm-gatsby-plugin-mdx-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Apr 15, 2026

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
gatsby-plugin-mdx (source) ^3.3.0^3.15.2 age adoption passing 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)

v3.15.2

Compare Source

🧾 Release notes

Bug Fixes
3.15.2 (2022-06-02)
Bug Fixes
3.15.1 (2022-06-01)

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

v3.15.1

Compare Source

🧾 Release notes

Bug Fixes
3.15.2 (2022-06-02)
Bug Fixes
3.15.1 (2022-06-01)

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

v3.15.0

Compare Source

🧾 Release notes

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

v3.14.0

Compare Source

🧾 Release notes

Bug Fixes

v3.13.0

Compare Source

🧾 Release notes

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

3.12.1 (2022-04-13)

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

v3.12.1

Compare Source

🧾 Release notes

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

3.12.1 (2022-04-13)

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

v3.12.0

Compare Source

🧾 Release notes

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

3.11.1 (2022-03-31)

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

v3.11.1

Compare Source

🧾 Release notes

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

3.11.1 (2022-03-31)

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

v3.11.0

Compare Source

🧾 Release notes

Bug Fixes
Chores
3.10.2 (2022-03-23)

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

3.10.1 (2022-03-18)

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

v3.10.2

Compare Source

🧾 Release notes

Bug Fixes
Chores
3.10.2 (2022-03-23)

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

3.10.1 (2022-03-18)

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

v3.10.1

Compare Source

🧾 Release notes

Bug Fixes
Chores
3.10.2 (2022-03-23)

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

3.10.1 (2022-03-18)

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

v3.10.0

Compare Source

🧾 Release notes

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

3.9.1 (2022-03-09)

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

v3.9.1

Compare Source

🧾 Release notes

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

3.9.1 (2022-03-09)

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

v3.9.0

Compare Source

🧾 Release notes

Chores
3.8.2 (2022-03-01)

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

3.8.1 (2022-02-25)

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

v3.8.2

Compare Source

🧾 Release notes

Chores
3.8.2 (2022-03-01)

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

3.8.1 (2022-02-25)

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

v3.8.1

Compare Source

🧾 Release notes

Chores
3.8.2 (2022-03-01)

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

3.8.1 (2022-02-25)

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

v3.8.0

Compare Source

🧾 Release notes

Chores
3.7.1 (2022-02-15)
Chores

v3.7.1

Compare Source

🧾 Release notes

Chores
3.7.1 (2022-02-15)
Chores

v3.7.0

Compare Source

🧾 Release notes

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

v3.6.0

Compare Source

🧾 Release notes

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

3.5.2 (2022-01-17)

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

3.5.1 (2022-01-12)

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

v3.5.2

Compare Source

🧾 Release notes

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

3.5.2 (2022-01-17)

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

3.5.1 (2022-01-12)

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

v3.5.1

Compare Source

🧾 Release notes

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

3.5.2 (2022-01-17)

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

3.5.1 (2022-01-12)

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

v3.5.0

Compare Source

🧾 Release notes

Chores

v3.4.0

Compare Source

🧾 Release notes

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


Configuration

📅 Schedule: (in timezone GMT)

  • 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 force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from e6416fb to 946c5ba Compare April 16, 2026 08:53
@renovate renovate Bot changed the title fix: update dependency gatsby-plugin-mdx to ^3.20.0 [security] fix: update dependency gatsby-plugin-mdx to ^3.15.2 [security] Apr 16, 2026
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from 946c5ba to 137f101 Compare April 16, 2026 15:47
@renovate renovate Bot changed the title fix: update dependency gatsby-plugin-mdx to ^3.15.2 [security] fix: update dependency gatsby-plugin-mdx to ^3.20.0 [security] Apr 16, 2026
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from 137f101 to d6e9daf Compare April 16, 2026 20:33
@renovate renovate Bot changed the title fix: update dependency gatsby-plugin-mdx to ^3.20.0 [security] fix: update dependency gatsby-plugin-mdx to ^3.15.2 [security] Apr 16, 2026
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from d6e9daf to a2da4fc Compare April 23, 2026 16:15
@renovate renovate Bot changed the title fix: update dependency gatsby-plugin-mdx to ^3.15.2 [security] fix: update dependency gatsby-plugin-mdx to ^3.20.0 [security] Apr 23, 2026
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from a2da4fc to bfffa04 Compare April 23, 2026 18:12
@renovate renovate Bot changed the title fix: update dependency gatsby-plugin-mdx to ^3.20.0 [security] fix: update dependency gatsby-plugin-mdx to ^3.15.2 [security] Apr 23, 2026
@renovate renovate Bot changed the title fix: update dependency gatsby-plugin-mdx to ^3.15.2 [security] fix: update dependency gatsby-plugin-mdx to ^3.15.2 [security] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
@renovate renovate Bot deleted the renovate/npm-gatsby-plugin-mdx-vulnerability branch April 27, 2026 18:43
@renovate renovate Bot changed the title fix: update dependency gatsby-plugin-mdx to ^3.15.2 [security] - autoclosed fix: update dependency gatsby-plugin-mdx to ^3.15.2 [security] Apr 28, 2026
@renovate renovate Bot reopened this Apr 28, 2026
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch 3 times, most recently from 8bdbb5a to c929297 Compare April 29, 2026 15:14
@renovate renovate Bot changed the title fix: update dependency gatsby-plugin-mdx to ^3.15.2 [security] fix: update dependency gatsby-plugin-mdx to ^3.20.0 [security] Apr 29, 2026
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from c929297 to f40c0a5 Compare April 29, 2026 21:55
@renovate renovate Bot changed the title fix: update dependency gatsby-plugin-mdx to ^3.20.0 [security] fix: update dependency gatsby-plugin-mdx to ^3.15.2 [security] Apr 29, 2026
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from f40c0a5 to 03036cc Compare April 30, 2026 14:54
@renovate renovate Bot changed the title fix: update dependency gatsby-plugin-mdx to ^3.15.2 [security] fix: update dependency gatsby-plugin-mdx to ^3.20.0 [security] Apr 30, 2026
@renovate renovate Bot force-pushed the renovate/npm-gatsby-plugin-mdx-vulnerability branch from 03036cc to a9e1203 Compare April 30, 2026 19:04
@renovate renovate Bot changed the title fix: update dependency gatsby-plugin-mdx to ^3.20.0 [security] fix: update dependency gatsby-plugin-mdx to ^3.15.2 [security] Apr 30, 2026
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