-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
chore(deps): update dependency webpack-dev-server to v5.2.1 [security] #4368
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
base: main
Are you sure you want to change the base?
Conversation
105ce13
to
5d83cd0
Compare
|
Command | Status | Duration | Result |
---|---|---|---|
nx affected --targets=test:eslint,test:unit,tes... |
❌ Failed | 3m 41s | View ↗ |
nx run-many --target=build --exclude=examples/*... |
❌ Failed | 1m 25s | View ↗ |
☁️ Nx Cloud last updated this comment at 2025-08-31 11:53:00
UTC
More templates
@tanstack/arktype-adapter
@tanstack/directive-functions-plugin
@tanstack/eslint-plugin-router
@tanstack/history
@tanstack/react-router
@tanstack/react-router-devtools
@tanstack/react-router-with-query
@tanstack/react-start
@tanstack/react-start-client
@tanstack/react-start-plugin
@tanstack/react-start-server
@tanstack/router-cli
@tanstack/router-core
@tanstack/router-devtools
@tanstack/router-devtools-core
@tanstack/router-generator
@tanstack/router-plugin
@tanstack/router-utils
@tanstack/router-vite-plugin
@tanstack/server-functions-plugin
@tanstack/solid-router
@tanstack/solid-router-devtools
@tanstack/solid-start
@tanstack/solid-start-client
@tanstack/solid-start-plugin
@tanstack/solid-start-server
@tanstack/start-client-core
@tanstack/start-plugin-core
@tanstack/start-server-core
@tanstack/start-server-functions-client
@tanstack/start-server-functions-fetcher
@tanstack/start-server-functions-server
@tanstack/valibot-adapter
@tanstack/virtual-file-routes
@tanstack/zod-adapter
commit: |
5d83cd0
to
d0e6dfb
Compare
a09063c
to
67a1c39
Compare
5bd50d1
to
1f644f1
Compare
c8aaa67
to
abde382
Compare
e299f7f
to
c4c365d
Compare
675bb15
to
8b342cb
Compare
8b342cb
to
fd448c8
Compare
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
fd448c8
to
db1b365
Compare
Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs from Renovate will soon appear from 'Mend'. Learn more here.
This PR contains the following updates:
5.2.0
->5.2.1
GitHub Vulnerability Alerts
CVE-2025-30359
Summary
Source code may be stolen when you access a malicious web site.
Details
Because the request for classic script by a script tag is not subject to same origin policy, an attacker can inject
<script src="http://localhost:8080/main.js">
in their site and run the script. Note that the attacker has to know the port and the output entrypoint script path. Combined with prototype pollution, the attacker can get a reference to the webpack runtime variables.By using
Function::toString
against the values in__webpack_modules__
, the attacker can get the source code.PoC
npm i
npx webpack-dev-server
https://e29c9a88-a242-4fb4-9e64-b24c9d29b35b.pages.dev/
The script in the POC site is:
This script uses the function generated by
renderRequire
.Especially, it uses the fact that
Array::forEach
is called for__webpack_require__.i
andexecOptions
contains__webpack_require__
.It uses prototype pollution against
Array::forEach
to extract__webpack_require__
reference.Impact
This vulnerability can result in the source code to be stolen for users that uses a predictable port and output path for the entrypoint script.
Old content
Summary
Source code may be stolen when you use
output.iife: false
and access a malicious web site.Details
When
output.iife: false
is set, some global variables for the webpack runtime are declared on thewindow
object (e.g.__webpack_modules__
).Because the request for classic script by a script tag is not subject to same origin policy, an attacker can inject
<script src="http://localhost:8080/main.js">
in their site and run the script. Note that the attacker has to know the port and the output entrypoint script path. By running that, the webpack runtime variables will be declared on thewindow
object.By using
Function::toString
against the values in__webpack_modules__
, the attacker can get the source code.I pointed out
output.iife: false
, but if there are other options that makes the webpack runtime variables to be declared on thewindow
object, the same will apply for those cases.PoC
npm i
npx webpack-dev-server
https://852aafa3-5f83-44da-9fc6-ea116d0e3035.pages.dev/
src/index.js
and other scripts loaded.The script in the POC site is:
Impact
This vulnerability can result in the source code to be stolen for users that has
output.iife: false
option set and uses a predictable port and output path for the entrypoint script.CVE-2025-30360
Summary
Source code may be stolen when you access a malicious web site with non-Chromium based browser.
Details
The
Origin
header is checked to prevent Cross-site WebSocket hijacking from happening which was reported by CVE-2018-14732.But webpack-dev-server always allows IP address
Origin
headers.https://github.com/webpack/webpack-dev-server/blob/55220a800ba4e30dbde2d98785ecf4c80b32f711/lib/Server.js#L3113-L3127
This allows websites that are served on IP addresses to connect WebSocket.
By using the same method described in the article linked from CVE-2018-14732, the attacker get the source code.
related commit: webpack/webpack-dev-server@72efaab (note that
checkHost
function was only used for Host header to prevent DNS rebinding attacks so this change itself is fine.This vulnerability does not affect Chrome 94+ (and other Chromium based browsers) users due to the non-HTTPS private access blocking feature.
PoC
npm i
npx webpack-dev-server
http://{ipaddress}/?target=http://localhost:8080&file=main
with a non-Chromium browser (I used Firefox 134.0.1)src/index.js
in the extracted directorysrc/index.js
The script in the POC site is:
Impact
This vulnerability can result in the source code to be stolen for users that uses a predictable port and uses a non-Chromium based browser.
Release Notes
webpack/webpack-dev-server (webpack-dev-server)
v5.2.1
Compare Source
Security
Access-Control-Allow-Origin
headerOrigin
header are not allowed to connect to WebSocket server unless configured byallowedHosts
or it different from theHost
headerThe above changes may make the dev server not work if you relied on such behavior, but unfortunately they carry security risks, so they were considered as fixes.
Bug Fixes
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled because a matching PR was automerged previously.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.