<?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://cve.radiocsirt.org/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-10-16T15:08:41.567231+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>csirt@opendfir.org</email>
  </author>
  <link href="https://cve.radiocsirt.org" 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://cve.radiocsirt.org/vuln/ghsa-rjr7-jggh-pgcp</id>
    <title>GHSA-rjr7-jggh-pgcp — chi's RealIP Middleware allows IP spoofing via unvalidated X-Forwarded-For header</title>
    <updated>2026-10-16T15:08:41.583049+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> Go: github.com/go-chi/chi/middleware, Go: github.com/go-chi/chi/v2/middleware, Go: github.com/go-chi/chi/v3/middleware, Go: github.com/go-chi/chi/v4/middleware, Go: github.com/go-chi/chi/v5/middleware</p>
<p>### Summary
realip middleware in go-chi/chi trusts headers like x-forwarded-for without checking them, so attackers can fake their ip and bypass rate limits or access controls</p>
<p>### Details</p>
<p>the vuln is in middleware/realip.go , the realIP() function pulls IPs straight from client headers and replaces r.RemoteAddr without checking if the request came from a trusted proxy</p>
<p>```go
func realIP(r *http.Request) string {
    var ip string
    if tcip := r.Header.Get(trueClientIP); tcip != "" {
        ip = tcip  // controlled by attacker
    } else if xrip := r.Header.Get(xRealIP); xrip != "" {
        ip = xrip  // controlled by attacker
    } else if xff := r.Header.Get(xForwardedFor); xff != "" {
        ip, _, _ = strings.Cut(xff, ",")  // controlled by attacker
    }
    // ...
    return ip
}
```</p>
<p>no trusted proxy cidr check in place, any client can send these headers</p>
<p>### PoC</p>
<p>create a server with chi and use realip middleware</p>
<p>```go
package main</p>
<p>import (
    "fmt"
    "net/http"
    "github.com/go-chi/chi/v5"
    "github.com/go-chi/chi/v5/middleware"
)</p>
<p>func main() {
    r := chi.NewRouter()
    r.Use(middleware.RealIP)</p>
<p>r.Get("/admin", func(w http.ResponseWriter, r *http.Request) {
        // ip-based access control got bypassed
        if r.RemoteAddr == "127.0.0.1" {
            w.Write([]byte("SECRET ADMIN DATA"))
            return
        }
        http.Error(w, "Forbidden", 403)
    })</p>
<p>http.ListenAndServe(":8080", r)
}
```</p>
<p>spoofed the ip to bypass access c…</p></div>
    </content>
    <link href="https://cve.radiocsirt.org/vuln/ghsa-rjr7-jggh-pgcp"/>
  </entry>
</feed>
