<?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://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-09-29T13:29:30.233926+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" 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://vulnerability.circl.lu/vuln/ghsa-mqqf-5wvp-8fh8</id>
    <title>GHSA-mqqf-5wvp-8fh8 — chi has an open redirect vulnerability in the RedirectSlashes middleware</title>
    <updated>2026-09-29T13:29:30.235996+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> Go: github.com/go-chi/chi/v5</p>
<p>### Summary</p>
<p>The `RedirectSlashes` function in middleware/strip.go does not perform correct input validation and can lead to an open redirect vulnerability.</p>
<p>### Details</p>
<p>The `RedirectSlashes` function performs a `Trim` to all forward slash (`/`) characters, while prepending a single one at the begining of the path (Line 52).</p>
<p>However, it does not trim backslashes (`\`).</p>
<p>```go
File: middleware/strip.go
41: func RedirectSlashes(next http.Handler) http.Handler {
...
51: 			// Trim all leading and trailing slashes (e.g., "//evil.com", "/some/path//")
52: 			path = "/" + strings.Trim(path, "/")
...
62: }
```</p>
<p>Also, from version 5.2.2 onwards the `RedirectSlashes` function does not take into consideration the `Host` Header in the redirect response returned. This was done in order to combat another [[vulnerability](https://github.com/go-chi/chi/security/advisories/GHSA-vrw8-fxc6-2r93)](https://github.com/go-chi/chi/security/advisories/GHSA-vrw8-fxc6-2r93).</p>
<p>The above make it possible for a response in the following form:</p>
<p>```
HTTP/1.1 301 Moved Permanently
Location: /\evil.com
```</p>
<p>The `/\evil.com` will be transformed by most browsers (Chrome, Firefox, etc. not Safari) into `//evil.com` which is a protocol relative URL and will result in a redirect to `evil.com`, essentially making it an open redirect vulnerability.</p>
<p>### PoC</p>
<p>A minimal working example can be seen below.</p>
<p>```go
package main</p>
<p>import (
	"fmt"
	"net/http"</p>
<p>"github.com/go-chi/chi/v5"
	"github.com/go-chi/chi/v5/middle…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/ghsa-mqqf-5wvp-8fh8"/>
  </entry>
</feed>
