# CVE-2025-68157: webpack buildHttp HttpUriPlugin allowedUris bypass via HTTP redirects

> Webpack's HttpUriPlugin fails to re-validate allowed URIs after redirects, enabling build-time SSRF and untrusted code inclusion when buildHttp is enabled.

- **Severity:** Low 3.7 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 5 Feb 2026
- **Updated:** 6 Feb 2026
- **Also known as:** CLEANSTART-2026-KM19669, CLEANSTART-2026-OS60036, CLSA-2026-1776645369, DEBIAN-CVE-2025-68157, GHSA-38r7-794h-5758, MINI-69j2-923m-7w6v, MINI-7jfq-r6m6-qvx8, MINI-jh54-qpf6-h87c, MINI-qgpm-82q7-m94g, MINI-rjqw-rrgc-7fhj, UBUNTU-CVE-2025-68157

## What is CVE-2025-68157?

CVE-2025-68157 is a low-severity server-side request forgery vulnerability in webpack, published on 5 Feb 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

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.

Weakness: CWE-918 (Server-Side Request Forgery)

## Which versions are affected by CVE-2025-68157?

2 open source packages ship an affected version, including webpack. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `webpack` | npm | From 5.49.0 | 5.104.0 |
| `webpack` | npm | From 5.49.0 | 5.104.0 |

Products: Webpack.js Webpack.

## How do I fix CVE-2025-68157?

Upgrade webpack to 5.104.0 or later.

## Is CVE-2025-68157 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-68157 exists.

## Other vulnerabilities in webpack

- [CVE-2023-28154](https://insights.sbomify.com/CVE-2023-28154/): Cross-realm object access in Webpack 5 (critical 9.8)
- [CVE-2024-43788](https://insights.sbomify.com/CVE-2024-43788/): DOM Clobbering Gadget found in Webpack's AutoPublicPathRuntimeModule that leads to Cross-site Scripting (XSS) (medium 6.4)
- [CVE-2025-68458](https://insights.sbomify.com/CVE-2025-68458/): webpack buildHttp: allowedUris allow-list bypass via URL userinfo (@) leading to build-time SSRF behavior (low 3.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-68157 and fix it if it is affected.

What it is: CVE-2025-68157 is a low-severity server-side request forgery vulnerability in webpack, published on 5 Feb 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-68157 exists.

Affected packages and fixed versions:
- webpack (npm): affected from 5.49.0; fixed in 5.104.0
- webpack (npm): affected from 5.49.0; fixed in 5.104.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-68157/ (Markdown: https://insights.sbomify.com/CVE-2025-68157/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-68157
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-68157
- OSV: https://osv.dev/vulnerability/CVE-2025-68157

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-68157/
Summaries are generated and may contain mistakes; the official description above is the record.
