{"id":"CVE-2018-14731","published":"2018-09-21T17:00:00Z","modified":"2024-08-05T09:38:13Z","title":"An issue was discovered in HMRServer.js in Parcel parcel-bundler","vendor":null,"product":null,"tier":"tail","description":{"text":"An issue was discovered in HMRServer.js in Parcel parcel-bundler. Attackers are able to steal developer's code because the origin of requests is not checked by the WebSocket server, which is used for HMR (Hot Module Replacement). Anyone can receive the HMR message sent by the WebSocket server via a ws://127.0.0.1 connection (with a random TCP port number) from any origin. The random port number can be found by connecting to http://127.0.0.1 and reading the \"new WebSocket\" line in the source code.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.02327,"percentile":0.83921,"provenance":"source"},"cwes":[],"references":[{"url":"https://github.com/parcel-bundler/parcel/issues/1783","tags":["x_refsource_CONFIRM"]},{"url":"https://blog.cal1.cn/post/Sniffing%20Codes%20in%20Hot%20Module%20Reloading%20Messages","tags":["x_refsource_MISC"]},{"url":"https://github.com/parcel-bundler/parcel/pull/1794","tags":["x_refsource_CONFIRM"]}],"priority":{"score":16.8,"factors":[{"name":"EPSS percentile","points":16.78}]},"affected":[{"ecosystem":"npm","package":"parcel-bundler","vulnerableRanges":["<1.10.0"],"patched":["1.10.0"],"from":["GHSA-37q6-576q-vgr7"],"provenance":"source"}],"summary":{"text":"The flaw is in HMRServer.js in Parcel's parcel-bundler, where the WebSocket server used for Hot Module Replacement does not check the origin of incoming requests. An attacker can exploit this, without authentication, by connecting from any origin to the WebSocket server on 127.0.0.1 and receiving the HMR messages it sends, which can expose developers' code. The attacker would first need to learn the random TCP port by requesting the local page at http://127.0.0.1 and reading the port from the \"new WebSocket\" line in its source.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:33:12Z"},"euvd":{"id":"EUVD-2018-0484","exploited":false,"provenance":"source"}}