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

🚨 [security] Update esbuild 0.24.0 → 0.25.0 (major) #249

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

Conversation

depfu[bot]
Copy link

@depfu depfu bot commented Feb 10, 2025


🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ esbuild (0.24.0 → 0.25.0) · Repo · Changelog

Security Advisories 🚨

🚨 esbuild enables any website to send any requests to the development server and read the response

Summary

esbuild allows any websites to send any request to the development server and read the response due to default CORS settings.

Details

esbuild sets Access-Control-Allow-Origin: * header to all requests, including the SSE connection, which allows any websites to send any request to the development server and read the response.

    <tbody>
res.Header().Set("Access-Control-Allow-Origin", "*")

    <tbody>
res.Header().Set("Access-Control-Allow-Origin", "*")

Attack scenario:

  1. The attacker serves a malicious web page (http://malicious.example.com).
  2. The user accesses the malicious web page.
  3. The attacker sends a fetch('http://127.0.0.1:8000/main.js') request by JS in that malicious web page. This request is normally blocked by same-origin policy, but that's not the case for the reasons above.
  4. The attacker gets the content of http://127.0.0.1:8000/main.js.

In this scenario, I assumed that the attacker knows the URL of the bundle output file name. But the attacker can also get that information by

  • Fetching /index.html: normally you have a script tag here
  • Fetching /assets: it's common to have a assets directory when you have JS files and CSS files in a different directory and the directory listing feature tells the attacker the list of files
  • Connecting /esbuild SSE endpoint: the SSE endpoint sends the URL path of the changed files when the file is changed (new EventSource('/esbuild').addEventListener('change', e => console.log(e.type, e.data)))
  • Fetching URLs in the known file: once the attacker knows one file, the attacker can know the URLs imported from that file

The scenario above fetches the compiled content, but if the victim has the source map option enabled, the attacker can also get the non-compiled content by fetching the source map file.

PoC

  1. Download reproduction.zip
  2. Extract it and move to that directory
  3. Run npm i
  4. Run npm run watch
  5. Run fetch('http://127.0.0.1:8000/app.js').then(r => r.text()).then(content => console.log(content)) in a different website's dev tools.

image

Impact

Users using the serve feature may get the source code stolen by malicious websites.

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/aix-ppc64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/android-arm (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/android-arm64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/android-x64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/darwin-arm64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/darwin-x64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/freebsd-arm64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/freebsd-x64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/linux-arm (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/linux-arm64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/linux-ia32 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/linux-loong64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/linux-mips64el (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/linux-ppc64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/linux-riscv64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/linux-s390x (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/linux-x64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/netbsd-x64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/openbsd-arm64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/openbsd-x64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/sunos-x64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/win32-arm64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/win32-ia32 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ @​esbuild/win32-x64 (indirect, 0.24.0 → 0.25.0) · Repo · Changelog

Release Notes

0.25.0

More info than we can show here.

0.24.2

More info than we can show here.

0.24.1

More info than we can show here.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

🆕 @​esbuild/netbsd-arm64 (added, 0.25.0)


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added the depfu label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants