<?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-30T19:55:12.418697+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-vrw8-fxc6-2r93</id>
    <title>GHSA-vrw8-fxc6-2r93 — chi Allows Host Header Injection which Leads to Open Redirect in RedirectSlashes</title>
    <updated>2026-09-30T19:55:12.421449+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
The RedirectSlashes function in middleware/strip.go is vulnerable to host header injection which leads to open redirect.</p>
<p>We consider this a **lower-severity** open redirect, as it can't be exploited from browsers or email clients (requires manipulation of a Host header).</p>
<p>### Details
The RedirectSlashes method uses the Host header to construct the redirectURL at this line https://github.com/go-chi/chi/blob/master/middleware/strip.go#L55</p>
<p>The Host header can be manipulated by a user to be any arbitrary host. This leads to open redirect when using the RedirectSlashes middleware</p>
<p>### PoC
Create a simple server which uses the RedirectSlashes middleware
```
package main</p>
<p>import (
	"fmt"
	"net/http"</p>
<p>"github.com/go-chi/chi/v5"
	"github.com/go-chi/chi/v5/middleware" // Import the middleware package
)</p>
<p>func main() {
	// Create a new Chi router
	r := chi.NewRouter()</p>
<p>// Use the built-in RedirectSlashes middleware
	r.Use(middleware.RedirectSlashes) // Use middleware.RedirectSlashes</p>
<p>// Define a route handler
	r.Get("/", func(w http.ResponseWriter, r *http.Request) {
		// A simple response
		w.Write([]byte("Hello, World!"))
	})</p>
<p>// Start the server
	fmt.Println("Starting server on :8080")
	http.ListenAndServe(":8080", r)
}
```
Run the server `go run main.go`</p>
<p>Once the server is running, send a request that will trigger the RedirectSlashes function with an arbitrary Host header
`curl -iL -H "Host: example.com" http://localhost:8080/test/`</p>
<p>Observe that the request will…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/ghsa-vrw8-fxc6-2r93"/>
  </entry>
</feed>
