<?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>Fri, 04 Dec 2026 21:57:11 +0000</lastBuildDate>
    <item>
      <title>GHSA-64mm-vxmg-q3vj — http-proxy-middleware `router` host+path substring matching allows Host-header-driven backend routing bypass</title>
      <link>https://db.gcve.eu/vuln/ghsa-64mm-vxmg-q3vj</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: http-proxy-middleware&lt;/p&gt;
&lt;p&gt;# Summary&lt;/p&gt;
&lt;p&gt;`http-proxy-middleware` documents `router` proxy-table entries as host, path, or host+path selectors, but the host+path implementation uses unanchored substring matching on attacker-controlled request metadata. As a result, a crafted `Host` header that is only a superstring match for a configured host+path key can still route a request to an unintended backend.&lt;/p&gt;
&lt;p&gt;# Details&lt;/p&gt;
&lt;p&gt;Tested code state:&lt;/p&gt;
&lt;p&gt;- validated on tag `v4.0.0-beta.5`
- corresponding commit: `339f09ede860197807d4fd99ed9020fa5d0bd358`&lt;/p&gt;
&lt;p&gt;Relevant code locations:&lt;/p&gt;
&lt;p&gt;- `src/router.ts`
- `src/http-proxy-middleware.ts`&lt;/p&gt;
&lt;p&gt;Affected public API:&lt;/p&gt;
&lt;p&gt;- `createProxyMiddleware({ router: { &amp;#39;host/path&amp;#39;: &amp;#39;http://target&amp;#39; } })`&lt;/p&gt;
&lt;p&gt;Code explanation:&lt;/p&gt;
&lt;p&gt;When a proxy-table router key contains `/`, `getTargetFromProxyTable()` concatenates attacker-controlled `req.headers.host` and `req.url` into a single `hostAndPath` string, then accepts the route if:&lt;/p&gt;
&lt;p&gt;```ts
hostAndPath.indexOf(key) &amp;gt; -1
```&lt;/p&gt;
&lt;p&gt;That is a substring test, not an exact host match plus intended path match. In the validated PoC, the configured router key is:&lt;/p&gt;
&lt;p&gt;```txt
localhost:3000/api
```&lt;/p&gt;
&lt;p&gt;but the attacker-controlled host is:&lt;/p&gt;
&lt;p&gt;```txt
evillocalhost:3000
```&lt;/p&gt;
&lt;p&gt;and the request path is:&lt;/p&gt;
&lt;p&gt;```txt
/api
```&lt;/p&gt;
&lt;p&gt;The concatenated attacker-controlled string:&lt;/p&gt;
&lt;p&gt;```txt
evillocalhost:3000/api
```&lt;/p&gt;
&lt;p&gt;still contains the configured router key as a substring, so the middleware selects the alternate backend even though the host is not equal to the configured host.&lt;/p&gt;
&lt;p&gt;Exploit path:&lt;/p&gt;
&lt;p&gt;1. the application ena…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: http-proxy-middleware&lt;/p&gt;
&lt;p&gt;# Summary&lt;/p&gt;
&lt;p&gt;`http-proxy-middleware` documents `router` proxy-table entries as host, path, or host+path selectors, but the host+path implementation uses unanchored substring matching on attacker-controlled request metadata. As a result, a crafted `Host` header that is only a superstring match for a configured host+path key can still route a request to an unintended backend.&lt;/p&gt;
&lt;p&gt;# Details&lt;/p&gt;
&lt;p&gt;Tested code state:&lt;/p&gt;
&lt;p&gt;- validated on tag `v4.0.0-beta.5`
- corresponding commit: `339f09ede860197807d4fd99ed9020fa5d0bd358`&lt;/p&gt;
&lt;p&gt;Relevant code locations:&lt;/p&gt;
&lt;p&gt;- `src/router.ts`
- `src/http-proxy-middleware.ts`&lt;/p&gt;
&lt;p&gt;Affected public API:&lt;/p&gt;
&lt;p&gt;- `createProxyMiddleware({ router: { &amp;#39;host/path&amp;#39;: &amp;#39;http://target&amp;#39; } })`&lt;/p&gt;
&lt;p&gt;Code explanation:&lt;/p&gt;
&lt;p&gt;When a proxy-table router key contains `/`, `getTargetFromProxyTable()` concatenates attacker-controlled `req.headers.host` and `req.url` into a single `hostAndPath` string, then accepts the route if:&lt;/p&gt;
&lt;p&gt;```ts
hostAndPath.indexOf(key) &amp;gt; -1
```&lt;/p&gt;
&lt;p&gt;That is a substring test, not an exact host match plus intended path match. In the validated PoC, the configured router key is:&lt;/p&gt;
&lt;p&gt;```txt
localhost:3000/api
```&lt;/p&gt;
&lt;p&gt;but the attacker-controlled host is:&lt;/p&gt;
&lt;p&gt;```txt
evillocalhost:3000
```&lt;/p&gt;
&lt;p&gt;and the request path is:&lt;/p&gt;
&lt;p&gt;```txt
/api
```&lt;/p&gt;
&lt;p&gt;The concatenated attacker-controlled string:&lt;/p&gt;
&lt;p&gt;```txt
evillocalhost:3000/api
```&lt;/p&gt;
&lt;p&gt;still contains the configured router key as a substring, so the middleware selects the alternate backend even though the host is not equal to the configured host.&lt;/p&gt;
&lt;p&gt;Exploit path:&lt;/p&gt;
&lt;p&gt;1. the application ena…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/ghsa-64mm-vxmg-q3vj</guid>
    </item>
  </channel>
</rss>
