CVE-2026-14620: webpack-dev-server CSRF Vulnerability Allows Remote File Opening
webpack-dev-server, a popular development utility for JavaScript applications, contains a cross-site request forgery (CSRF) vulnerability that allows any website a developer visits to secretly perform actions on their local development server. Specifically, two internal endpoints that manage file editing and code recompilation accept requests from external sites without verification. An attacker can craft a malicious webpage that, when opened by a developer, triggers these endpoints to open arbitrary files on the developer's system in their code editor or force wasteful recompilations. The vulnerability affects webpack-dev-server version 5.2.5 and earlier.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 4.7 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:N/A:L
- Weaknesses (CWE)
- CWE-352, CWE-749
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-07-03 / 2026-07-07
NVD description (verbatim)
webpack-dev-server versions 5.2.5 and earlier expose two internal developer endpoints, /webpack-dev-server/open-editor and /webpack-dev-server/invalidate, that perform state-changing actions on any GET request without verifying that the request originated from the dev server's own page. Any website a developer visits while the dev server is running can trigger these endpoints cross-origin with no interaction beyond the visit. An attacker can open an arbitrary existing local file in the developer's editor, including files outside the project root, and repeated requests can spawn editor processes and force recompilations that degrade the developer's machine. Patches: upgrade to webpack-dev-server 5.2.6. Workarounds: none.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from inadequate origin validation on two state-changing endpoints: /webpack-dev-server/open-editor and /webpack-dev-server/invalidate. These endpoints process GET requests that modify developer machine state—opening files in an editor and triggering bundle recompilation—without checking the Referer or Origin header or implementing Cross-Origin Resource Sharing (CORS) protections. Because GET requests are inherently cacheable and can be triggered by embedded resources or navigation, an attacker can craft a webpage that silently makes cross-origin requests to localhost:port/webpack-dev-server/invalidate or /webpack-dev-server/open-editor. The open-editor endpoint is particularly dangerous because it accepts file paths that may exist anywhere on the filesystem, not just within the project root. This violates CWE-352 (Cross-Site Request Forgery) and CWE-749 (Exposed Dangerous Method or Function).
Business impact
Developers using webpack-dev-server are at direct risk. An attacker can degrade development productivity by forcing repeated recompilations, exhausting system resources, and potentially disrupting IDE workflows. More critically, the ability to open arbitrary files in an editor—even outside the project directory—could expose sensitive configuration files, credentials, or private keys if the attacker can predict or enumerate file paths. In team environments or shared development machines, this could be a vector for lateral movement or information leakage. The attack requires only that a developer visit a malicious website while their dev server is running, a scenario that may be difficult to prevent in practice.
Affected systems
webpack-dev-server versions 5.2.5 and earlier are vulnerable. The dev server is primarily used during local development by individual developers and small teams; it is not intended for production use. However, any developer or organization using webpack-dev-server for frontend development with this or an earlier version is exposed. No bypass or workaround is documented; remediation requires upgrading to version 5.2.6.
Exploitability
Exploitability is straightforward. An attacker needs only to host a webpage (or inject content into an existing site) that makes cross-origin requests to localhost on common dev server ports (typically 8080, 8081, etc.) targeting the vulnerable endpoints. The attack requires user interaction in the form of the developer visiting the malicious page—but this is easily satisfied through phishing, social engineering, or if the attacker controls a website the developer frequents. No special privileges, authentication, or technical sophistication is required. The CVSS score of 4.7 reflects the moderate severity: the attack vector is network-based and unauthenticated, but the impact is limited to availability (recompilation delays) rather than confidentiality or integrity of source code, and it requires user interaction (the developer must visit a page).
Remediation
Upgrade webpack-dev-server to version 5.2.6 or later immediately. This release patches the vulnerability by adding proper origin validation to the vulnerable endpoints. No configuration workarounds or mitigations are available for versions 5.2.5 and earlier, so patching is the only remediation path. Development teams should audit their dependency lock files and CI/CD pipelines to ensure webpack-dev-server is pinned to a patched version going forward.
Patch guidance
Update webpack-dev-server to 5.2.6 as released. Verify the upgrade in your package.json or package-lock.json file, then rebuild your development environment. For teams using monorepos or centralized dependency management, ensure all projects referencing webpack-dev-server are updated. Consider automating this via dependency scanning tools or Dependabot to prevent regression.
Detection guidance
Monitor for unusual requests to /webpack-dev-server/* endpoints in development server logs, particularly GET requests originating from external origins. Watch for unexpected file-open events in developers' IDEs or text editors while dev servers are active. Network traffic analysis can reveal cross-origin requests to localhost dev ports from malicious external sites. Endpoint detection and response (EDR) tools may flag rapid editor process spawning or repeated compilation cycles triggered by unexpected network events.
Why prioritize this
Although rated MEDIUM severity (CVSS 4.7), this vulnerability warrants prompt patching because it directly targets developer machines and can be exploited with minimal effort by any attacker who can trick a developer into visiting a webpage. The attack surface is broad—any website the developer visits becomes a potential attack vector—and the lack of available workarounds means the only mitigation is upgrading. For organizations with large development teams, the cumulative risk of multiple developers running vulnerable versions is non-trivial.
Risk score, explained
The CVSS 4.7 score reflects: (1) network-based attack vector with no special privileges or authentication required; (2) low attack complexity; (3) user interaction necessary (developer must visit the malicious page); (4) impact scoped to the developer's machine only (not the application or broader network); (5) availability impact through resource exhaustion and disruption, but no confidentiality or integrity impact on source code itself. If an attacker successfully enumerates or predicts sensitive file paths on the developer's system, information disclosure risk could be higher, which explains why CWE-749 is flagged alongside the CSRF vulnerability.
Frequently asked questions
Can this vulnerability be exploited against a production webpack application?
No. webpack-dev-server is a development-only tool and is not used in production deployments. Once code is bundled and deployed, the dev server and its endpoints are no longer accessible.
Do I need to update webpack-dev-server if I'm using a different development server like Vite or Parcel?
No, this vulnerability is specific to webpack-dev-server. Other build tools and dev servers have their own security profiles. However, you should still keep all development dependencies current as a general best practice.
What if I run webpack-dev-server only on a non-standard port or behind a firewall?
Running on a non-standard port or behind a firewall may reduce exposure, but it does not eliminate the risk. An attacker can still craft requests targeting common ports, and if your dev server is accessible at all from the network (including a local WiFi network), it remains vulnerable until patched.
Does this vulnerability affect the production bundle generated by webpack-dev-server?
No. The vulnerability affects only the dev server's internal endpoints and state during development. The final bundled code shipped to production is not affected. However, if an attacker uses the open-editor endpoint to modify source files, those changes could theoretically be bundled and deployed if committed without review.
This analysis is based on the CVE record and vendor advisory as of the publication date. Security details and patch availability may evolve. Organizations should consult the official webpack-dev-server repository and security advisories for the most current guidance. No exploit code or weaponized proof-of-concept is provided. This vulnerability is not currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog, but exploitation may be straightforward and active monitoring is recommended. Source: NVD (public-domain), retrieved 2026-08-12. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2016-20067MEDIUMWordPress CP Polls CSRF Vulnerability
- CVE-2016-20074MEDIUMWordPress Lazy Content Slider CSRF Vulnerability – Patch & Detection Guide
- CVE-2016-20083MEDIUMWordPress More Fields Plugin CSRF Vulnerability – Exploitation, Remediation & Detection
- CVE-2018-25387MEDIUMHaPe PKH 1.1 Cross-Site Request Forgery (CSRF) Admin Password Reset
- CVE-2018-25397MEDIUMCSRF Vulnerability in PHP-SHOP 1.0 – Admin Account Injection
- CVE-2018-25435MEDIUMZeusCart 4.0 CSRF Vulnerability – Account Deactivation Risk
- CVE-2022-44630MEDIUMYITH WooCommerce Product Slider Carousel CSRF Vulnerability
- CVE-2022-47150MEDIUMCSRF Vulnerability in WooCommerce Conversion Tracking Plugin – Patch Guidance