<?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-12-04T21:57:11.760559+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-64mm-vxmg-q3vj</id>
    <title>GHSA-64mm-vxmg-q3vj — http-proxy-middleware `router` host+path substring matching allows Host-header-driven backend routing bypass</title>
    <updated>2026-12-04T21:57:11.761886+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> npm: http-proxy-middleware</p>
<p># Summary</p>
<p>`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.</p>
<p># Details</p>
<p>Tested code state:</p>
<p>- validated on tag `v4.0.0-beta.5`
- corresponding commit: `339f09ede860197807d4fd99ed9020fa5d0bd358`</p>
<p>Relevant code locations:</p>
<p>- `src/router.ts`
- `src/http-proxy-middleware.ts`</p>
<p>Affected public API:</p>
<p>- `createProxyMiddleware({ router: { 'host/path': 'http://target' } })`</p>
<p>Code explanation:</p>
<p>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:</p>
<p>```ts
hostAndPath.indexOf(key) &gt; -1
```</p>
<p>That is a substring test, not an exact host match plus intended path match. In the validated PoC, the configured router key is:</p>
<p>```txt
localhost:3000/api
```</p>
<p>but the attacker-controlled host is:</p>
<p>```txt
evillocalhost:3000
```</p>
<p>and the request path is:</p>
<p>```txt
/api
```</p>
<p>The concatenated attacker-controlled string:</p>
<p>```txt
evillocalhost:3000/api
```</p>
<p>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.</p>
<p>Exploit path:</p>
<p>1. the application ena…</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/ghsa-64mm-vxmg-q3vj"/>
  </entry>
</feed>
