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

Esbuild 0.21.5 uses binaries which contains known vulnerabilities #12360

Open
1 task done
LunaticMuch opened this issue Nov 2, 2024 · 1 comment · May be fixed by #12361
Open
1 task done

Esbuild 0.21.5 uses binaries which contains known vulnerabilities #12360

LunaticMuch opened this issue Nov 2, 2024 · 1 comment · May be fixed by #12361
Labels
needs triage Issue needs to be triaged

Comments

@LunaticMuch
Copy link
Contributor

Astro Info

Astro                    v4.16.8
Node                     v20.16.0
System                   macOS (arm64)
Package Manager          unknown
Output                   hybrid
Adapter                  @astrojs/node
Integrations             @astrojs/react
                         @astrojs/starlight
                         @astrojs/tailwind

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Current astro v4.16.8 uses a version of esbuild which can contain some vulnerabilities. The current version pinned in the build is 0.21.5 aligned with vite.
Version 0.21.5 downloads some prebuilt binaries which, on some architecture (notably LInux), contain some vulnerabilities. In particular:

Package Version Link CVE
net/http 1.20.12 CVE-2023-45289 https://pkg.go.dev/vuln/GO-2024-2600
net/http 1.20.12 CVE-2024-24791 https://pkg.go.dev/vuln/GO-2024-2963
crypto/x509 1.20.12 CVE-2024-24783 https://pkg.go.dev/vuln/GO-2024-2598
archive/zip 1.20.12 CVE-2024-24789 https://pkg.go.dev/vuln/GO-2024-2888

What's the expected result?

Upgrading to esbuild 0.24 addresses the problem as esbuild team has already upgrade the version of go used to building the binaries.
Moreover, the current version of vite already uses the right version, so this change fit the approach of aligning esbuild to the same version as vite

└─┬ [email protected]
  ├── [email protected]
  └─┬ [email protected]
    └── [email protected] deduped

Link to Minimal Reproducible Example

none

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Nov 2, 2024
@LunaticMuch LunaticMuch linked a pull request Nov 2, 2024 that will close this issue
@bluwy
Copy link
Member

bluwy commented Nov 4, 2024

Moreover, the current version of vite already uses the right version, so this change fit the approach of aligning esbuild to the same version as vite

You're referencing the esbuild version from the Vite 6 beta. Astro stable is still using Vite 5 stable, which is using esbuild v0.21. So the dependencies here don't dedupe.

Upgrading to 0.22, 0.23, or 0.24 are all breaking changes and we can't do in a stable as well. Furthermore, the vulnerabilities listed all do not affect us. It only affects esbuild's dev server, which is not used. The vulnerabilities can be ignored.

(Sorry accidentally pressed close, but let's discuss this first)

@bluwy bluwy closed this as completed Nov 4, 2024
@bluwy bluwy reopened this Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants