[Security] Bump esbuild, laravel-vite-plugin and vite
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#L363Attack scenario:
- The attacker serves a malicious web page (
http://malicious.example.com
).- The user accesses the malicious web page.
- 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.- 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 bycancel()
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
, and1n
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 adelay
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 thewatch()
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
andimport.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 thoughimport
is normally a keyword that can't be used as an identifier, ES modules special-case theimport.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 intsconfig.json
(#4004)TypeScript recently added
es2024
as a compilation target, so esbuild now supports this in thetarget
field oftsconfig.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
andpure
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
-
d38c1f0
publish 0.25.6 to npm -
11e547e
missing)
in release notes -
cc8ac0a
fix trailing comment whitespace -
1e3fb57
fix #4178: add the--watch-delay=
option -
c1f5f18
fix #4209: disable binary executable optimization on WASM platform (#4210) -
3ed5ecc
fix incorrect locations inCHANGELOG.md
-
248089c
fix #4224: allowtry
statements to become dead -
42f159c
openharmony: keep makefile targets sorted -
63256e1
chore: fix some comments (#4211) -
d803f72
add support for openharmony-arm64 platform (#4212) - Additional commits viewable in compare view
Updates laravel-vite-plugin
from 1.0.2 to 1.3.0
Release notes
Sourced from laravel-vite-plugin's releases.
v1.3.0
- Use rollup types from Vite by
@sapphi-red
in laravel/vite-plugin#325v1.2.0
- [1.x] Fix Invalid URL issue with Vite 6.0.9 by
@batinmustu
in laravel/vite-plugin#317- [1.x] Add default CORS origins by
@timacdonald
in laravel/vite-plugin#318v1.1.1
- [1.1] Fix dependency issue with Vite 5 by
@jessarcher
in laravel/vite-plugin#313v1.1.0
- Upgrade to Vite 6 by
@timacdonald
in laravel/vite-plugin#310v1.0.6
- Replace dead link in Security Policy by
@Jubeki
in laravel/vite-plugin#300- Look for certificates in valet linux config directory by
@jameshulse
in laravel/vite-plugin#307v1.0.5
- TypeScript: define entrypoints using object by
@tylerlwsmith
in laravel/vite-plugin#298v1.0.4
- Include base in hotFile without modifying server.origin replacement by
@danielztolnai
in laravel/vite-plugin#296v1.0.3
- Append base to hot file by
@timacdonald
in laravel/vite-plugin#290- Support Laravel Herd for windows by
@mozex
in laravel/vite-plugin#293
Changelog
Sourced from laravel-vite-plugin's changelog.
v1.3.0 - 2025-06-03
- Use rollup types from Vite by
@sapphi-red
in laravel/vite-plugin#325v1.2.0 - 2025-01-21
- [1.x] Fix Invalid URL issue with Vite 6.0.9 by
@batinmustu
in laravel/vite-plugin#317- [1.x] Add default CORS origins by
@timacdonald
in laravel/vite-plugin#318v1.1.1 - 2024-12-03
- [1.1] Fix dependency issue with Vite 5 by
@jessarcher
in laravel/vite-plugin#313v1.1.0 - 2024-12-02
- Upgrade to Vite 6 by
@timacdonald
in laravel/vite-plugin#310v1.0.6 - 2024-11-12
- Replace dead link in Security Policy by
@Jubeki
in laravel/vite-plugin#300- Look for certificates in valet linux config directory by
@jameshulse
in laravel/vite-plugin#307v1.0.5 - 2024-07-09
- TypeScript: define entrypoints using object by
@tylerlwsmith
in laravel/vite-plugin#298v1.0.4 - 2024-05-17
- Include base in hotFile without modifying server.origin replacement by
@danielztolnai
in laravel/vite-plugin#296v1.0.3 - 2024-05-16
- Append base to hot file by
@timacdonald
in laravel/vite-plugin#290- Support Laravel Herd for windows by
@mozex
in laravel/vite-plugin#293
Commits
-
9d835fe
version -
aa697cd
Use rollup types from Vite (#325) -
c0c82ca
Comment on duplicated regex -
6dbbe25
chore: Updateupdate-changelog.yml
-
4e3e0b1
Update CHANGELOG -
0201f3f
1.2.0 -
b3a3abf
[1.x] Add default CORS origins (#318) -
1501f5c
[1.x] Fix Invalid URL issue with Vite 6.0.9 (#317) -
e57a940
Update CHANGELOG -
b91e205
1.1.1 - Additional commits viewable in compare view
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
- deps: update dependency dotenv to v17 (#20325) (45040d4)
- deps: update dependency rolldown to ^1.0.0-beta.24 (#20365) (5ab25e7)
- use
n/prefer-node-protocol
rule (#20368) (38bb268)Code Refactoring
7.0.2 (2025-07-04)
Bug Fixes
7.0.1 (2025-07-03)
Bug Fixes
- css: skip resolving resolved paths in sass (#20300) (ac528a4)
- deps: update all non-major dependencies (#20324) (3e81af3)
- types: add a global interface for Worker (#20243) (37bdfc1)
Miscellaneous Chores
- deps: update rolldown-related dependencies (#20323) (30d2f1b)
- fix typos and grammatical errors across documentation and comments (#20337) (c1c951d)
- group commits by category in changelog (#20310) (41e83f6)
- rearrange 7.0 changelog (#20280) (eafd28a)
7.0.0 (2025-06-24)
Today, we're excited to announce the release of the next Vite major:
- Vite 7.0 announcement blog post
- Docs (translations: 简体中文, 日本語, Español, Português, 한국어, Deutsch, فارسی)
- Migration Guide
⚠️ BREAKING CHANGES
... (truncated)
Commits
-
f562df8
release: v7.0.3 -
38bb268
chore: usen/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