Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

fix(deps): update dependency gatsby-transformer-remark to v5.25.1 [security] #933

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

svc-secops
Copy link
Contributor

@svc-secops svc-secops commented Sep 12, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
gatsby-transformer-remark (source) 5.4.0 -> 5.25.1 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2023-22491

Impact

The gatsby-transformer-remark plugin prior to versions 5.25.1 and 6.3.2 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 in gatsby-transformer-remark when passing input in data mode (querying MarkdownRemark 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 by or added into a file processed by gatsby-transformer-remark. The following payload demonstrates a vulnerable configuration:

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

Patches

A patch has been introduced in [email protected] and [email protected] 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 MarkdownRemark input is attempting to use the Frontmatter engine.

Workarounds

If an older version of gatsby-transformer-remark 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.

For more information

Email us at [email protected].


gatsby-transformer-remark has possible unsanitized JavaScript code injection

CVE-2023-22491 / GHSA-7ch4-rr99-cqcw

More information

Details

Impact

The gatsby-transformer-remark plugin prior to versions 5.25.1 and 6.3.2 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 in gatsby-transformer-remark when passing input in data mode (querying MarkdownRemark 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 by or added into a file processed by gatsby-transformer-remark. The following payload demonstrates a vulnerable configuration:

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

A patch has been introduced in [email protected] and [email protected] 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 MarkdownRemark input is attempting to use the Frontmatter engine.

Workarounds

If an older version of gatsby-transformer-remark 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.

For more information

Email us at [email protected].

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 OSV and the GitHub Advisory Database (CC-BY 4.0).


Release Notes

gatsbyjs/gatsby (gatsby-transformer-remark)

v5.25.1

Compare Source

v5.25.0

Compare Source

v5.24.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-transformer-remark

5.23.1 (2022-09-22)

Note: Version bump only for package gatsby-transformer-remark

v5.23.1

Compare Source

Note: Version bump only for package gatsby-transformer-remark

v5.23.0

Compare Source

🧾 Release notes

Chores

v5.22.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-transformer-remark

v5.21.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-transformer-remark

v5.20.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-transformer-remark

v5.19.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-transformer-remark

5.18.1 (2022-07-12)

Note: Version bump only for package gatsby-transformer-remark

v5.18.1

Compare Source

Note: Version bump only for package gatsby-transformer-remark

v5.18.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-transformer-remark

v5.17.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-transformer-remark

v5.16.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-transformer-remark

5.15.1 (2022-06-01)

Note: Version bump only for package gatsby-transformer-remark

v5.15.1

Compare Source

Note: Version bump only for package gatsby-transformer-remark

v5.15.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-transformer-remark

v5.14.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-transformer-remark

v5.13.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-transformer-remark

5.12.1 (2022-04-13)

Note: Version bump only for package gatsby-transformer-remark

v5.12.1

Compare Source

Note: Version bump only for package gatsby-transformer-remark

v5.12.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-transformer-remark

5.11.1 (2022-03-31)

Note: Version bump only for package gatsby-transformer-remark

v5.11.1

Compare Source

Note: Version bump only for package gatsby-transformer-remark

v5.11.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-transformer-remark

5.10.2 (2022-03-23)

Note: Version bump only for package gatsby-transformer-remark

5.10.1 (2022-03-18)

Note: Version bump only for package gatsby-transformer-remark

v5.10.2

Compare Source

Note: Version bump only for package gatsby-transformer-remark

v5.10.1

Compare Source

Note: Version bump only for package gatsby-transformer-remark

v5.10.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-transformer-remark

5.9.1 (2022-03-09)

Note: Version bump only for package gatsby-transformer-remark

v5.9.1

Compare Source

Note: Version bump only for package gatsby-transformer-remark

v5.9.0

Compare Source

🧾 Release notes

Chores
5.8.2 (2022-03-01)

Note: Version bump only for package gatsby-transformer-remark

5.8.1 (2022-02-25)

Note: Version bump only for package gatsby-transformer-remark

v5.8.2

Compare Source

Note: Version bump only for package gatsby-transformer-remark

v5.8.1

Compare Source

Note: Version bump only for package gatsby-transformer-remark

v5.8.0

Compare Source

🧾 Release notes

Note: Version bump only for package gatsby-transformer-remark

v5.7.0

Compare Source

🧾 Release notes

Bug Fixes
  • update dependency underscore.string to ^3.3.6 for gatsby-transformer-remark #​34653 (1d2530e)

v5.6.0

Compare Source

🧾 Release notes

Bug Fixes
5.5.2 (2022-01-17)

Note: Version bump only for package gatsby-transformer-remark

5.5.1 (2022-01-12)

Note: Version bump only for package gatsby-transformer-remark

v5.5.2

Compare Source

Note: Version bump only for package gatsby-transformer-remark

v5.5.1

Compare Source

Note: Version bump only for package gatsby-transformer-remark

v5.5.0

Compare Source

🧾 Release notes

Chores

Configuration

📅 Schedule: Branch creation - "" in timezone Etc/UTC, Automerge - "after 8am and before 4pm on tuesday" in timezone Etc/UTC.

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


This PR has been generated by Renovate Bot.

@svc-secops svc-secops requested a review from a team as a code owner September 12, 2024 13:21
@svc-secops svc-secops added dependencies Pull requests that update a dependency file vulnerability labels Sep 12, 2024
Copy link

netlify bot commented Sep 12, 2024

Deploy Preview for apollo-monodocs ready!

Name Link
🔨 Latest commit 1f04ff1
🔍 Latest deploy log https://app.netlify.com/sites/apollo-monodocs/deploys/66f7fe07089fac00085d2a4c
😎 Deploy Preview https://deploy-preview-933--apollo-monodocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 29 (🔴 down 29 from production)
Accessibility: 85 (no change from production)
Best Practices: 92 (no change from production)
SEO: 89 (🟢 up 8 from production)
PWA: 50 (🟢 up 10 from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@svc-secops svc-secops force-pushed the renovate/npm-gatsby-transformer-remark-vulnerability branch 2 times, most recently from df78dbe to 8595fbc Compare September 18, 2024 12:55
@svc-secops svc-secops force-pushed the renovate/npm-gatsby-transformer-remark-vulnerability branch 3 times, most recently from dafd29d to 1f04ff1 Compare September 28, 2024 13:00
@svc-secops svc-secops force-pushed the renovate/npm-gatsby-transformer-remark-vulnerability branch from 1f04ff1 to 51b7e1a Compare October 16, 2024 12:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file vulnerability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant