Skip to content

[Security] Bump esbuild, laravel-vite-plugin and vite

Dependabot requested to merge dependabot-npm_and_yarn-multi-2f3453f14b into main

Bumps esbuild to 0.25.6 and updates ancestor dependencies esbuild, laravel-vite-plugin and vite. These dependencies need to be updated together.

Updates esbuild from 0.20.2 to 0.25.6 This update includes a security fix.

Vulnerabilities fixed

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.

https://github.com/evanw/esbuild/blob/df815ac27b84f8b34374c9182a93c94718f8a630/pkg/api/serve_other.go#L121
https://github.com/evanw/esbuild/blob/df815ac27b84f8b34374c9182a93c94718f8a630/pkg/api/serve_other.go#L363

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

... (truncated)

Patched versions: 0.25.0
Affected versions: <= 0.24.2

Release notes

Sourced from esbuild's releases.

v0.25.6

  • Fix a memory leak when cancel() is used on a build context (#4231)

    Calling rebuild() followed by cancel() in rapid succession could previously leak memory. The bundler uses a producer/consumer model internally, and the resource leak was caused by the consumer being termianted while there were still remaining unreceived results from a producer. To avoid the leak, the consumer now waits for all producers to finish before terminating.

  • Support empty :is() and :where() syntax in CSS (#4232)

    Previously using these selectors with esbuild would generate a warning. That warning has been removed in this release for these cases.

  • Improve tree-shaking of try statements in dead code (#4224)

    With this release, esbuild will now remove certain try statements if esbuild considers them to be within dead code (i.e. code that is known to not ever be evaluated). For example:

    // Original code
    return 'foo'
    try { return 'bar' } catch {}
    // Old output (with --minify)
    return"foo";try{return"bar"}catch{}
    // New output (with --minify)
    return"foo";
  • Consider negated bigints to have no side effects

    While esbuild currently considers 1, -1, and 1n to all have no side effects, it didn't previously consider -1n to have no side effects. This is because esbuild does constant folding with numbers but not bigints. However, it meant that unused negative bigint constants were not tree-shaken. With this release, esbuild will now consider these expressions to also be side-effect free:

    // Original code
    let a = 1, b = -1, c = 1n, d = -1n
    // Old output (with --bundle --minify)
    (()=>{var n=-1n;})();
    // New output (with --bundle --minify)
    (()=>{})();
  • Support a configurable delay in watch mode before rebuilding (#3476, #4178)

    The watch() API now takes a delay option that lets you add a delay (in milliseconds) before rebuilding when a change is detected in watch mode. If you use a tool that regenerates multiple source files very slowly, this should make it more likely that esbuild's watch mode won't generate a broken intermediate build before the successful final build. This option is also available via the CLI using the --watch-delay= flag.

    This should also help avoid confusion about the watch() API's options argument. It was previously empty to allow for future API expansion, which caused some people to think that the documentation was missing. It's no longer empty now that the watch() API has an option.

  • Allow mixed array for entryPoints API option (#4223)

    The TypeScript type definitions now allow you to pass a mixed array of both string literals and object literals to the entryPoints API option, such as ['foo.js', { out: 'lib', in: 'bar.js' }]. This was always possible to do in JavaScript but the TypeScript type definitions were previously too restrictive.

... (truncated)

Changelog

Sourced from esbuild's changelog.

Changelog: 2024

This changelog documents all esbuild versions published in the year 2024 (versions 0.19.12 through 0.24.2).

0.24.2

  • Fix regression with --define and import.meta (#4010, #4012, #4013)

    The previous change in version 0.24.1 to use a more expression-like parser for define values to allow quoted property names introduced a regression that removed the ability to use --define:import.meta=.... Even though import is normally a keyword that can't be used as an identifier, ES modules special-case the import.meta expression to behave like an identifier anyway. This change fixes the regression.

    This fix was contributed by @​sapphi-red.

0.24.1

  • Allow es2024 as a target in tsconfig.json (#4004)

    TypeScript recently added es2024 as a compilation target, so esbuild now supports this in the target field of tsconfig.json files, such as in the following configuration file:

    {
      "compilerOptions": {
        "target": "ES2024"
      }
    }

    As a reminder, the only thing that esbuild uses this field for is determining whether or not to use legacy TypeScript behavior for class fields. You can read more in the documentation.

    This fix was contributed by @​billyjanitsch.

  • Allow automatic semicolon insertion after get/set

    This change fixes a grammar bug in the parser that incorrectly treated the following code as a syntax error:

    class Foo {
      get
      *x() {}
      set
      *y() {}
    }

    The above code will be considered valid starting with this release. This change to esbuild follows a similar change to TypeScript which will allow this syntax starting with TypeScript 5.7.

  • Allow quoted property names in --define and --pure (#4008)

    The define and pure API options now accept identifier expressions containing quoted property names. Previously all identifiers in the identifier expression had to be bare identifiers. This change now makes --define and --pure consistent with --global-name, which already supported quoted property names. For example, the following is now possible:

... (truncated)

Commits

Updates laravel-vite-plugin from 1.0.2 to 1.3.0

Release notes

Sourced from laravel-vite-plugin's releases.

v1.3.0

v1.2.0

v1.1.1

v1.1.0

v1.0.6

v1.0.5

v1.0.4

v1.0.3

Changelog

Sourced from laravel-vite-plugin's changelog.

v1.3.0 - 2025-06-03

v1.2.0 - 2025-01-21

v1.1.1 - 2024-12-03

v1.1.0 - 2024-12-02

v1.0.6 - 2024-11-12

v1.0.5 - 2024-07-09

v1.0.4 - 2024-05-17

v1.0.3 - 2024-05-16

Commits

Updates vite from 5.2.11 to 7.0.3

Release notes

Sourced from vite's releases.

create-vite@7.0.1

Please refer to CHANGELOG.md for details.

create-vite@7.0.0

Please refer to CHANGELOG.md for details.

create-vite@6.5.0

Please refer to CHANGELOG.md for details.

create-vite@6.4.1

Please refer to CHANGELOG.md for details.

create-vite@6.4.0

Please refer to CHANGELOG.md for details.

create-vite@6.3.1

Please refer to CHANGELOG.md for details.

create-vite@6.3.0

Please refer to CHANGELOG.md for details.

create-vite@6.2.1

Please refer to CHANGELOG.md for details.

create-vite@6.2.0

Please refer to CHANGELOG.md for details.

create-vite@6.1.1

Please refer to CHANGELOG.md for details.

create-vite@6.1.0

Please refer to CHANGELOG.md for details.

create-vite@6.0.1

Please refer to CHANGELOG.md for details.

create-vite@6.0.0

Please refer to CHANGELOG.md for details.

create-vite@5.5.5

Please refer to CHANGELOG.md for details.

Changelog

Sourced from vite's changelog.

7.0.3 (2025-07-08)

Bug Fixes

  • client: protect against window being defined but addEv undefined (#20359) (31d1467)
  • define: replace optional values (#20338) (9465ae1)
  • deps: update all non-major dependencies (#20366) (43ac73d)

Miscellaneous Chores

Code Refactoring

  • minor changes to reduce diff between normal Vite and rolldown-vite (#20354) (2e8050e)

7.0.2 (2025-07-04)

Bug Fixes

7.0.1 (2025-07-03)

Bug Fixes

Miscellaneous Chores

7.0.0 (2025-06-24)

Vite 7 is out!

Today, we're excited to announce the release of the next Vite major:

⚠️ BREAKING CHANGES

  • ssr: don't access Object variable in ssr transformed code (#19996)
  • remove experimental.skipSsrTransform option (#20038)

... (truncated)

Commits
  • f562df8 release: v7.0.3
  • 38bb268 chore: use n/prefer-node-protocol rule (#20368)
  • 45040d4 chore(deps): update dependency dotenv to v17 (#20325)
  • 9465ae1 fix(define): replace optional values (#20338)
  • 43ac73d fix(deps): update all non-major dependencies (#20366)
  • 31d1467 fix(client): protect against window being defined but addEv undefined (#20359)
  • 5ab25e7 chore(deps): update dependency rolldown to ^1.0.0-beta.24 (#20365)
  • 2e8050e refactor: minor changes to reduce diff between normal Vite and rolldown-vite ...
  • d6464bc release: v7.0.2
  • db8bd41 fix(css): resolve relative paths in sass, revert #20300 (#20349)
  • Additional commits viewable in compare view

Merge request reports

Loading