Go straight to an AI summary of this blog post instead

  • Summarize this post with Perplexity
  • Summarize this post with Gemini

Key Takeaways

  • Build tools create production risk even when they never ship as application runtime code.
  • webpack publishes no LTS branches, and fixes arrive in the active 5.x line rather than older minors.
  • Build-time code runs with whatever source, credentials, and tokens the build process can reach.
  • Rebuilding with the same vulnerable webpack changes nothing, because the flaw is re-emitted every time.

Most vulnerability programs quietly exempt the build chain. It lives in devDependencies, it never runs on a production host, and when it turns up in a scan report it earns a shrug and a spot near the bottom of the queue. That logic looks reasonable when a dependency never reaches production. It falls apart for webpack in two specific ways.

This post covers what webpack’s support model actually is, why a pinned 5.x minor is unsupported code in practice, and how to treat the build chain as an attack surface without stalling every release.

The build still passes, so nobody touches it

The webpack config in a legacy repository gets treated as untouchable because it keeps working, and nobody wants to be the person who breaks it. Stable build systems have a way of becoming the oldest software in the company – nothing ever forces anyone to go back and look at them.

Then a triage meeting happens. A scanner flags a webpack CVE, someone glances at it, says “that’s build time only,” and the ticket slides down the queue behind everything that feels like real production risk. The reasoning sounds fine. It’s wrong twice over.

The first mistake is treating webpack’s output as separate from the bundler itself. webpack injects its own runtime code into the bundle, so a flaw in that runtime becomes a flaw in the application you ship.

The second is assuming a build tool is only reachable at build time. The dev server has its own class of vulnerabilities aimed squarely at the engineers running it. And the deeper problem is treating devDependencies as a risk rating at all. It’s a packaging label, not a security boundary. A bundler just makes that unusually obvious, because part of what it generates ends up in production.

webpack 4 is done and webpack 5 has no LTS

webpack doesn’t publish an LTS calendar, a support matrix, or a sunset schedule. Fixes land in the actively developed 5.x line rather than in maintained older branches, so a minor you stay pinned to can be left behind the moment something gets fixed upstream.

webpack 4 shipped in February 2018, webpack 5 arrived in October 2020, and the 4.x line ended at 4.47.0 in September 2023. Migration from 4 to 5 took the ecosystem years, and plenty of teams never finished it. If you’re still on 4, you’re running code that receives no upstream fixes at all.

webpack 5 is healthier, but only at the tip. The current release is 5.110.3, published in September 2026, and the two fixes below show the practical problem, because each one arrived in a newer 5.x release rather than as a backport to the older affected minors. The project’s 2026 roadmap laid out native CSS handling, a universal compilation target, TypeScript without loaders, and groundwork for webpack 6, and the release line has been moving fast on all of it. Experimental TypeScript support arrived in 5.107, and the 5.110 release deprecated css-loader, style-loader, and mini-css-extract-plugin in favor of webpack’s built-in CSS support. The patched version upstream, in other words, is also the one that keeps changing under you.

Did You Know: Being “on webpack 5” says almost nothing about your patch status. A repo locked to 5.76.1 sits more than thirty minor releases behind the current patched line, even though webpack 5 is still the project’s current major release.

That gap between “supported major” and “patched version” is where audits get uncomfortable. Picture a bank front end pinned to one 5.x minor because the pipeline is certified and any toolchain change drags the whole thing back through recertification. Moving the bundler means re-running that process, so the pin stays, and the unsupported code stays with it. This is the exact situation extended support is built for, letting a team stay patched on a branch it cannot easily move off.

Some bundler bugs end up in the browser

Some webpack vulnerabilities don’t live in the build step at all. They live in the code webpack writes into your bundle, which is why the bundler belongs on your production attack surface and not just your build-time checklist.

CVE-2024-43788 is the clean example. It’s a DOM-clobbering gadget in webpack’s AutoPublicPathRuntimeModule, and it applies when output.publicPath is unset or set to auto. The upstream advisory lists versions before 5.93.0 as affected and 5.94.0 and later as patched, and NVD rates it Medium at 6.4. Worth knowing that auto is the effective default for web and web-worker targets when nobody sets publicPath, so this is not an exotic configuration.

The Medium label undersells the operational picture. The advisory reports real-world exploitation in Canvas LMS, and the vulnerable code is generated into the bundle rather than confined to a CI runner. Exploitation isn’t automatic, though. It needs a page that includes webpack-generated files and lets an attacker inject scriptless HTML with insufficiently sanitized name or id attributes. Where those conditions line up, the gadget can influence where your scripts load from, and that is a cross-site scripting path running in your users’ browsers, seeded by your build tool.

CVE-2023-28154 is the useful contrast, because it never leaves the build. It’s a cross-realm object access issue in ImportParserPlugin magic comment handling, affecting webpack 5 before 5.76.0. During compilation, an attacker who can influence the relevant untrusted object could cause webpack to reach the host realm’s global object. NVD rates it Critical at 9.8, while Red Hat scores the same flaw 9.1.

Rebuilding with the same vulnerable webpack helps with neither, for different reasons. The runtime code behind CVE-2024-43788 gets re-emitted into every bundle until webpack itself is patched, and CVE-2023-28154 sits in webpack’s own comment parsing, so it persists as long as that version is doing the compiling. Both fixes have been available upstream for years.

Watch Out: Before anyone argues about severity scores, check the version and the config. The advisory lists webpack before 5.93.0 as affected and 5.94.0 and later as patched, so anything short of 5.94.0 needs a look, and output.publicPath left unset or on auto is what puts the affected runtime in your bundle. Then check whether your application lets users inject HTML with unsanitized name or id attributes, because those conditions are central to exploitability.

Development dependency does not mean low risk

Even the vulnerabilities that stay at build time aren’t low stakes, because of what build-time code can touch. A bundler runs with whatever the build process has available, which usually means your source, your environment variables, your credentials, and in plenty of pipelines your publishing tokens. That’s a rich target.

CVE-2025-30359 and the related CVE-2025-30360 both end in source code theft from webpack-dev-server, and both were fixed in 5.2.1, but they get there differently. The first abuses the fact that a classic script request from a <script> tag isn’t subject to same-origin policy, so a malicious page can pull a bundle from a running dev server and, with a bit of prototype pollution, read the source back out of __webpack_modules__ using Function::toString. The second is cross-site WebSocket hijacking, where the Origin check allowed IP-address origins through, exposing developers on non-Chromium browsers, and it affects releases through 5.2.0.

The part that matters more now is that 5.2.1 wasn’t the end of it. That fix leaned on the Sec-Fetch-Mode and Sec-Fetch-Site headers, which browsers only send for potentially trustworthy origins, so over plain HTTP the headers are absent and the check gets skipped entirely. The bypass, CVE-2026-6402, affects webpack-dev-server through 5.2.3, and 5.2.4 closes it by setting Cross-Origin-Resource-Policy: same-origin. Serving the dev server over HTTPS is a documented workaround rather than a substitute for upgrading. Then 5.2.5 fixed CVE-2026-9595, where a broadly scoped user proxy with ws: true would swallow the dev server’s own HMR WebSocket and forward it to the proxy target, cookies and Origin header included. After that, 5.2.6 fixed a cross-site request forgery path through the internal open-editor and invalidate endpoints, along with a denial of service triggered by a malformed Host or Origin header, and the package itself has since moved on to 6.0.0. That run of fixes is a decent argument for not filing dev server findings under background noise.

Think about who this exposes. The published attack for CVE-2025-30359 has a malicious page requesting a bundle from a dev server on localhost, so a developer browsing the web with a dev server running is enough. The attacker needs the port and the output entrypoint path, and both tend to sit at defaults. That covers contractors on machines you don’t control and anyone who leaves a dev server up all day while they browse, and none of it shows up in a production-focused scan.

From the Trenches: Someone sets host to 0.0.0.0 to test on a phone, then forgets to change it back. That one edit turns a localhost-only tool into a network-listening one, which matters for the bugs that need network reach, like the malformed-header denial of service. It isn’t what creates the cross-origin source theft, though. That one works fine against localhost.

So the triage question was never localhost versus everything else. It’s the exact version you’re on, whether developers keep a dev server running while they browse, whether it’s serving over plain HTTP, and how guessable the port and output path are.

A team on 5.2.3 with default settings has a real finding whatever the bind address says. HTTPS mitigates the source-exposure path in CVE-2026-6402, but it doesn’t retire the advisories that came after it, so 5.2.4 is no general safety line. The 5.x fixes run through 5.2.6, and each applicable advisory earns its own look rather than a blanket ruling.

The hidden migration is larger than webpack

The reason these pins persist isn’t laziness. Moving a mature webpack setup is a genuine project, and teams stay put for reasons that hold up, starting with custom loaders and plugins, framework-specific build systems layered on top, config that accumulated through years of patches, output-sensitive caching, unsupported Node versions still living in CI, and the plain fear of changing a pipeline nobody fully understands.

A major bump doesn’t politely leave things alone either. It can change chunking, module resolution, polyfill behavior, asset handling, and the shape of the output. That means two test plans instead of one, because the build process and the resulting application both need validating.

The useful move is to stop treating “webpack” as a single line item and split it by where each piece actually runs. That’s the kind of exploitability context a Vulnerability Exploitability eXchange (VEX) document is meant to carry, recording that a loader on a CI runner and runtime code inside a shipped bundle are not the same risk.

Component Where it executes Reaches production output Triage priority
webpack-generated runtime code Build time, then in the browser Yes, when the affected runtime module is in the bundle High
webpack-dev-server Developer machines, plus the local network when exposed No Version and configuration dependent, highest on releases with applicable advisories
Loaders and plugins Build time, on CI or dev Sometimes, depends on the loader Case-by-case
Transitive build utilities Build time Rarely Low unless reachable

A decision framework for a legacy build

Move forward inside 5.x

If the config is documented and the surrounding dependencies are maintained, get onto the current 5.x release. It’s the cheapest path and it restores your patch supply. Do it this sprint rather than letting it slide into next quarter.

Rebuild the pipeline

If the historical complexity has outgrown its value, Rspack, Vite, and esbuild all deserve a serious look. Be honest about the cost, though. They’re faster, but rewriting a mature config with custom loaders, Module Federation, or careful code splitting is a real project that ends with nothing user-visible to show for it.

Patch the pinned version and keep the migration small

If the pipeline is certified, ripping out the bundler isn’t happening this year. This is where extended support earns its keep, holding the pinned branch at a patched state while you plan the larger move on your own timeline instead of an emergency one. TuxCare’s Endless Lifecycle Support covers webpack 5.50.0, 5.55.0, 5.76.1, 5.88.2, and 5.94.0, plus webpack-dev-server releases from 2.7.1 through 5.2.2, delivered through npm.

Be clear-eyed about what a backport preserves, though. It keeps your webpack version, your config, and your API surface intact, which can keep recertification scope far smaller than a full toolchain migration. What it cannot do is leave the emitted bundle byte-identical, because fixing generated runtime code means changing generated runtime code.

How TuxCare approaches extended webpack support

Extended support for a build tool means more than keeping an old version breathing. The real work sits in the details, and most of it is the kind of thing an in-house team can’t repeat month after month.

It starts with monitoring webpack and its covered transitive dependencies, then assessing whether a disclosed issue actually affects the legacy branch rather than relying on a published version range alone. That context-aware view, which factors in EOL status and transitive dependency risk, is what lets a team prioritize real exposure instead of chasing every line in a scan report.

From there, fixes get backported without dragging in the architectural changes that later releases carry. Each patched release is validated for compatibility and regressions so established build pipelines keep working, which is usually the real objection to patching anything on a certified stack. TuxCare isn’t trying to replace upstream webpack. The job is long-term stewardship of the versions the project has moved past, with the regression testing and compatibility work that production systems actually need. Every patched release ships with a Software Bill of Materials (SBOM) and a VEX document, and the artifacts carry detached GPG signatures from TuxCare’s own registry.

OpenJS and the long life of critical tooling

webpack is an OpenJS Impact Project, and the OpenJS Ecosystem Sustainability Program exists so archived, EOL, and older versions can pick up commercial security coverage, with a revenue share flowing back to the projects and the Foundation. TuxCare is a Gold member and an ESP partner, and the program is non-exclusive, so maintainers stay free to support any version they want.

Your build pipeline is part of the product even when customers never see it. A legacy build deserves the same lifecycle plan as the application it produces, not a permanent exemption from the one you already run everywhere else.

Summary
webpack Vulnerabilities, EOL Build Chains, and Extended Support
Article Name
webpack Vulnerabilities, EOL Build Chains, and Extended Support
Description
webpack 4 gets no fixes and older 5.x minors get no backports. See how TuxCare patches EOL webpack and dev-server flaws.
Author
Publisher Name
TuxCare
Publisher Logo

Join 4,500+ Linux & Open Source Professionals!

2x a month. No spam.

Table of Contents
Get the open-source security answers you need

Join 4,500+ Linux & Open Source Professionals!

2x a month. No spam.