{"api_version":"1","generated_at":"2026-05-12T11:05:32+00:00","cve":"CVE-2026-6402","urls":{"html":"https://cve.report/CVE-2026-6402","api":"https://cve.report/api/cve/CVE-2026-6402.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-6402","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-6402"},"summary":{"title":"webpack-dev-server vulnerable to cross-origin source code exposure on non-HTTPS origins","description":"webpack-dev-server versions up to and including 5.2.3 are vulnerable to cross-origin source code exposure when serving over a non-potentially trustworthy origin such as plain HTTP. The previous fix relied on the Sec-Fetch-Mode and Sec-Fetch-Site request headers, which browsers omit for non-trustworthy origins, allowing a malicious site to load the bundled source as a script and read it across origins. Impact: an attacker controlling a website visited by a developer running webpack-dev-server can recover the application source code when the dev server runs over HTTP at a guessable host and port. Chromium based browsers from Chrome 142 onward are not affected due to local network access restrictions. Upgrade to webpack-dev-server 5.2.4 or later, which sets Cross-Origin-Resource-Policy: same-origin on responses.","state":"PUBLISHED","assigner":"openjs","published_at":"2026-05-12 09:16:55","updated_at":"2026-05-12 09:16:55"},"problem_types":["CWE-749","CWE-749 CWE-749: Exposed Dangerous Method or Function"],"metrics":[{"version":"3.1","source":"ce714d77-add3-4f53-aff5-83d477b104bb","type":"Secondary","score":"5.3","severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N","baseScore":5.3,"baseSeverity":"MEDIUM","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"NONE","availabilityImpact":"NONE"}},{"version":"3.1","source":"CNA","type":"CVSS","score":"5.3","severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N","data":{"baseScore":5.3,"baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N","version":"3.1"}}],"references":[{"url":"https://cna.openjsf.org/security-advisories.html","name":"https://cna.openjsf.org/security-advisories.html","refsource":"ce714d77-add3-4f53-aff5-83d477b104bb","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/webpack/webpack-dev-server/security/advisories/GHSA-79cf-xcqc-c78w","name":"https://github.com/webpack/webpack-dev-server/security/advisories/GHSA-79cf-xcqc-c78w","refsource":"ce714d77-add3-4f53-aff5-83d477b104bb","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-6402","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-6402","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"webpack-dev-server","product":"webpack-dev-server","version":"affected 5.2.4 semver","platforms":[]},{"source":"CNA","vendor":"webpack-dev-server","product":"webpack-dev-server","version":"unaffected 5.2.4 semver","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[{"source":"CNA","value":"sapphi-red","lang":"en"},{"source":"CNA","value":"Ulises Gascón","lang":"en"},{"source":"CNA","value":"Sebastian Beltran","lang":"en"},{"source":"CNA","value":"Alexander Akait","lang":"en"}],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","packageURL":"pkg:npm/webpack-dev-server","product":"webpack-dev-server","vendor":"webpack-dev-server","versions":[{"lessThan":"5.2.4","status":"affected","version":"0","versionType":"semver"},{"status":"unaffected","version":"5.2.4","versionType":"semver"}]}],"credits":[{"lang":"en","type":"reporter","value":"sapphi-red"},{"lang":"en","type":"remediation developer","value":"Ulises Gascón"},{"lang":"en","type":"remediation developer","value":"Sebastian Beltran"},{"lang":"en","type":"remediation reviewer","value":"Alexander Akait"}],"descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"webpack-dev-server versions up to and including 5.2.3 are vulnerable to cross-origin source code exposure when serving over a non-potentially trustworthy origin such as plain HTTP. The previous fix relied on the Sec-Fetch-Mode and Sec-Fetch-Site request headers, which browsers omit for non-trustworthy origins, allowing a malicious site to load the bundled source as a script and read it across origins. Impact: an attacker controlling a website visited by a developer running webpack-dev-server can recover the application source code when the dev server runs over HTTP at a guessable host and port. Chromium based browsers from Chrome 142 onward are not affected due to local network access restrictions. Upgrade to webpack-dev-server 5.2.4 or later, which sets Cross-Origin-Resource-Policy: same-origin on responses."}],"value":"webpack-dev-server versions up to and including 5.2.3 are vulnerable to cross-origin source code exposure when serving over a non-potentially trustworthy origin such as plain HTTP. The previous fix relied on the Sec-Fetch-Mode and Sec-Fetch-Site request headers, which browsers omit for non-trustworthy origins, allowing a malicious site to load the bundled source as a script and read it across origins. Impact: an attacker controlling a website visited by a developer running webpack-dev-server can recover the application source code when the dev server runs over HTTP at a guessable host and port. Chromium based browsers from Chrome 142 onward are not affected due to local network access restrictions. Upgrade to webpack-dev-server 5.2.4 or later, which sets Cross-Origin-Resource-Policy: same-origin on responses."}],"metrics":[{"cvssV3_1":{"baseScore":5.3,"baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N","version":"3.1"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-749","description":"CWE-749: Exposed Dangerous Method or Function","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-05-12T07:45:21.253Z","orgId":"ce714d77-add3-4f53-aff5-83d477b104bb","shortName":"openjs"},"references":[{"url":"https://github.com/webpack/webpack-dev-server/security/advisories/GHSA-79cf-xcqc-c78w"},{"url":"https://cna.openjsf.org/security-advisories.html"}],"title":"webpack-dev-server vulnerable to cross-origin source code exposure on non-HTTPS origins","x_generator":{"engine":"cve-kit 1.0.0"}}},"cveMetadata":{"assignerOrgId":"ce714d77-add3-4f53-aff5-83d477b104bb","assignerShortName":"openjs","cveId":"CVE-2026-6402","datePublished":"2026-05-12T07:45:21.253Z","dateReserved":"2026-04-15T20:35:29.271Z","dateUpdated":"2026-05-12T07:45:21.253Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-05-12 09:16:55","lastModifiedDate":"2026-05-12 09:16:55","problem_types":["CWE-749","CWE-749 CWE-749: Exposed Dangerous Method or Function"],"metrics":{"cvssMetricV31":[{"source":"ce714d77-add3-4f53-aff5-83d477b104bb","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N","baseScore":5.3,"baseSeverity":"MEDIUM","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"NONE","availabilityImpact":"NONE"},"exploitabilityScore":1.6,"impactScore":3.6}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"6402","Ordinal":"1","Title":"webpack-dev-server vulnerable to cross-origin source code exposu","CVE":"CVE-2026-6402","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"6402","Ordinal":"1","NoteData":"webpack-dev-server versions up to and including 5.2.3 are vulnerable to cross-origin source code exposure when serving over a non-potentially trustworthy origin such as plain HTTP. The previous fix relied on the Sec-Fetch-Mode and Sec-Fetch-Site request headers, which browsers omit for non-trustworthy origins, allowing a malicious site to load the bundled source as a script and read it across origins. Impact: an attacker controlling a website visited by a developer running webpack-dev-server can recover the application source code when the dev server runs over HTTP at a guessable host and port. Chromium based browsers from Chrome 142 onward are not affected due to local network access restrictions. Upgrade to webpack-dev-server 5.2.4 or later, which sets Cross-Origin-Resource-Policy: same-origin on responses.","Type":"Description","Title":"webpack-dev-server vulnerable to cross-origin source code exposu"}]}}}