-
Notifications
You must be signed in to change notification settings - Fork 28
chore(deps): update dependency webpack-dev-server to v5 [security] #5945
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
26bc912 to
8e809d2
Compare
8e809d2 to
e8f9fa9
Compare
e8f9fa9 to
094cf51
Compare
094cf51 to
665e27b
Compare
|
update dependency webpack |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update dependency webpack
665e27b to
61b4054
Compare
This PR contains the following updates:
4.15.2->5.2.1GitHub Vulnerability Alerts
CVE-2025-30360
Summary
Source code may be stolen when you access a malicious web site with non-Chromium based browser.
Details
The
Originheader 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
Originheaders.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
checkHostfunction 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 inpx webpack-dev-serverhttp://{ipaddress}/?target=http://localhost:8080&file=mainwith a non-Chromium browser (I used Firefox 134.0.1)src/index.jsin the extracted directorysrc/index.jsThe 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.
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::toStringagainst the values in__webpack_modules__, the attacker can get the source code.PoC
npm inpx webpack-dev-serverhttps://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::forEachis called for__webpack_require__.iandexecOptionscontains__webpack_require__.It uses prototype pollution against
Array::forEachto 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: falseand access a malicious web site.Details
When
output.iife: falseis set, some global variables for the webpack runtime are declared on thewindowobject (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 thewindowobject.By using
Function::toStringagainst 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 thewindowobject, the same will apply for those cases.PoC
npm inpx webpack-dev-serverhttps://852aafa3-5f83-44da-9fc6-ea116d0e3035.pages.dev/src/index.jsand 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: falseoption set and uses a predictable port and output path for the entrypoint script.Release Notes
webpack/webpack-dev-server (webpack-dev-server)
v5.2.1Compare Source
Security
Access-Control-Allow-OriginheaderOriginheader are not allowed to connect to WebSocket server unless configured byallowedHostsor it different from theHostheaderThe 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
v5.2.0Compare Source
Features
getClientEntryandgetClientHotEntrymethods to get clients entries (dc642a8)Bug Fixes
v5.1.0Compare Source
Features
appoption to beFunction(by default only withconnectcompatibility frameworks) (3096148)serveroption to beFunction(#5275) (02a1c6d)connectandconnectcompatibility frameworks which support HTTP2 (#5267) (6509a3f)Bug Fixes
platformproperty to determinate the target (#5269) (c3b532c)rimrafwithrm(#5162) (1a1561f)devServer: false(#5272) (8b341cb)5.0.4 (2024-03-19)
Bug Fixes
5.0.3 (2024-03-12)
Bug Fixes
5.0.2 (2024-02-16)
Bug Fixes
5.0.1 (2024-02-13)
Bug Fixes
require-trusted-types-for(#5046) (e115436)v5.0.4Compare Source
Security
Access-Control-Allow-OriginheaderOriginheader are not allowed to connect to WebSocket server unless configured byallowedHostsor it different from theHostheaderThe 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
v5.0.3Compare Source
Features
appoption to beFunction(by default only withconnectcompatibility frameworks) (3096148)serveroption to beFunction(#5275) (02a1c6d)connectandconnectcompatibility frameworks which support HTTP2 (#5267) (6509a3f)Bug Fixes
platformproperty to determinate the target (#5269) (c3b532c)rimrafwithrm(#5162) (1a1561f)devServer: false(#5272) (8b341cb)5.0.4 (2024-03-19)
Bug Fixes
5.0.3 (2024-03-12)
Bug Fixes
5.0.2 (2024-02-16)
Bug Fixes
5.0.1 (2024-02-13)
Bug Fixes
require-trusted-types-for(#5046) (e115436)v5.0.2Compare Source
Features
appoption to beFunction(by default only withconnectcompatibility frameworks) (3096148)serveroption to beFunction(#5275) (02a1c6d)connectandconnectcompatibility frameworks which support HTTP2 (#5267) (6509a3f)Bug Fixes
platformproperty to determinate the target (#5269) (c3b532c)rimrafwithrm(#5162) (1a1561f)devServer: false(#5272) (8b341cb)5.0.4 (2024-03-19)
Bug Fixes
5.0.3 (2024-03-12)
Bug Fixes
5.0.2 (2024-02-16)
Bug Fixes
5.0.1 (2024-02-13)
Bug Fixes
require-trusted-types-for(#5046) (e115436)v5.0.1Compare Source
Features
appoption to beFunction(by default only withconnectcompatibility frameworks) (3096148)serveroption to beFunction(#5275) (02a1c6d)connectandconnectcompatibility frameworks which support HTTP2 (#5267) (6509a3f)Bug Fixes
platformproperty to determinate the target (#5269) (c3b532c)rimrafwithrm(#5162) (1a1561f)devServer: false(#5272) (8b341cb)5.0.4 (2024-03-19)
Bug Fixes
5.0.3 (2024-03-12)
Bug Fixes
5.0.2 (2024-02-16)
Bug Fixes
5.0.1 (2024-02-13)
Bug Fixes
require-trusted-types-for(#5046) (e115436)v5.0.0Compare Source
Features
appoption to beFunction(by default only withconnectcompatibility frameworks) (3096148)serveroption to beFunction(#5275) (02a1c6d)connectandconnectcompatibility frameworks which support HTTP2 (#5267) (6509a3f)Bug Fixes
platformproperty to determinate the target (#5269) (c3b532c)rimrafwithrm(#5162) (1a1561f)devServer: false(#5272) (8b341cb)5.0.4 (2024-03-19)
Bug Fixes
5.0.3 (2024-03-12)
Bug Fixes
5.0.2 (2024-02-16)
Bug Fixes
5.0.1 (2024-02-13)
Bug Fixes
require-trusted-types-for(#5046) (e115436)Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, 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.