Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: Rollup build XSS vulnerability (CVE-2024-43788) #759

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

Conversation

userquin
Copy link
Member

@userquin userquin commented Sep 24, 2024

Description

This PR removes Rollup from dependencies, using the exported types from Vite.

This is breaking since we need Vite 4.2.0+ to re-use exported Rollup types included in this PR vitejs/vite#12316 (included in Vite 4.2.0-beta.2 (2023-03-13)).

This PR doesn't solve CVE-2024-43788 since workbox-build and Vite have the same problem as pointed in the linked issue, the consumer should use overrides, resolutions or pnpm.overrides to override Rollup version.

Once Vite and workbox-build fix the vulnerability the PWA plugin should be ready.

Linked Issues

closes #758

Additional Context

This PR may or may not work when overriding Rollup 4.22.4:

  • the consumer using some missing options in the new version
  • same problem with Vite
  • same problem with workbox-build

Tip

The author of this PR can publish a preview release by commenting /publish below.

Copy link

netlify bot commented Sep 24, 2024

Deploy Preview for vite-plugin-pwa-legacy ready!

Name Link
🔨 Latest commit 71ddc24
🔍 Latest deploy log https://app.netlify.com/sites/vite-plugin-pwa-legacy/deploys/66f2ffa3e0c7300008b044af
😎 Deploy Preview https://deploy-preview-759--vite-plugin-pwa-legacy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link

pkg-pr-new bot commented Sep 24, 2024

pnpm add https://pkg.pr.new/vite-plugin-pwa@759

commit: 71ddc24

@userquin userquin marked this pull request as draft September 25, 2024 09:27
@leeobrum
Copy link

when will it work this update?

@userquin
Copy link
Member Author

userquin commented Oct 1, 2024

Check #758 (comment) (I need to do some final test)

@userquin userquin requested a review from antfu October 1, 2024 10:07
Copy link

@fabianszabo fabianszabo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping support for vite 3 seems a bit drastic to me. 👀

@userquin
Copy link
Member Author

userquin commented Oct 9, 2024

This workbox PR merged but not yet released: GoogleChrome/workbox#3359

I guess we don't need this PR, we can just update Rollup version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dependency 'rollup' vulnerability: DOM Clobbering Gadget found in rollup bundled scripts that leads to XSS
3 participants