Every CVE Search/ Get API key

CVE-2026-122132

go-chi chi 5.2.2 through 5.5.0 Open Redirect via RedirectSlashes Middleware

5.1 Medium

go-chi chi 5.2.2 through 5.5.0 contains an open redirect vulnerability in the RedirectSlashes middleware that allows attackers to redirect victims to external hosts by embedding tab characters in request paths. Attackers can craft links with a URL-encoded tab, which browsers strip from the 301 Location header and resolve as a protocol-relative URL, bypassing the fix for CVE-2025-69725.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Active

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
None

Exploit likelihood

0.27%Unchanged since Nov 5, 2026
90%50%10%1%

What each source reports

CVE List Score used 5.1

go-chi chi 5.2.2 through 5.5.0 Open Redirect via RedirectSlashes Middleware

go-chi chi 5.2.2 through 5.5.0 contains an open redirect vulnerability in the RedirectSlashes middleware that allows attackers to redirect victims to external hosts by embedding tab characters in request paths. Attackers can craft links with a URL-encoded tab, which browsers strip from the 301 Location header and resolve as a protocol-relative URL, bypassing the fix for CVE-2025-69725.

Record
CVE-2026-122132
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-601
Updated
2026-11-05
EUVDEUVD-2026-117086 5.1

go-chi chi 5.2.2 through 5.5.0 contains an open redirect vulnerability in the RedirectSlashes middleware that allows attackers to redirect victims to external hosts by embedding tab characters in request paths. Attackers can craft links with a URL-encoded tab, which browsers strip from the 301 Location header and resolve as a protocol-relative URL, bypassing the fix for CVE-2025-69725.

Record
EUVD-2026-117086
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
Updated
2026-11-05
GitHub AdvisoriesGHSA-27h9-x5w9-37mx 5.1

go-chi chi 5.2.2 through 5.5.0 contains an open redirect vulnerability in the RedirectSlashes...

go-chi chi 5.2.2 through 5.5.0 contains an open redirect vulnerability in the RedirectSlashes middleware that allows attackers to redirect victims to external hosts by embedding tab characters in request paths. Attackers can craft links with a URL-encoded tab, which browsers strip from the 301 Location header and resolve as a protocol-relative URL, bypassing the fix for CVE-2025-69725.

Record
GHSA-27h9-x5w9-37mx
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-601
Updated
2026-11-04
NVD 5.1

go-chi chi 5.2.2 through 5.5.0 contains an open redirect vulnerability in the RedirectSlashes middleware that allows attackers to redirect victims to external hosts by embedding tab characters in request paths. Attackers can craft links with a URL-encoded tab, which browsers strip from the 301 Location header and resolve as a protocol-relative URL, bypassing the fix for CVE-2025-69725.

Record
CVE-2026-122132
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-601
Updated
2026-11-05
OSVCVE-2025-69725 4.7

An Open Redirect vulnerability in the go-chi/chi >=5.2.2 RedirectSlashes function allows remote attackers to redirect victim users to malicious websites using the legitimate website domain.

Record
CVE-2025-69725
CVSS 3.1
4.7 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
Updated
2026-11-05
OSV 5.1

go-chi chi 5.2.2 through 5.5.0 Open Redirect via RedirectSlashes Middleware

go-chi chi 5.2.2 through 5.5.0 contains an open redirect vulnerability in the RedirectSlashes middleware that allows attackers to redirect victims to external hosts by embedding tab characters in request paths. Attackers can craft links with a URL-encoded tab, which browsers strip from the 301 Location header and resolve as a protocol-relative URL, bypassing the fix for CVE-2025-69725.

Record
CVE-2026-122132
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
Weakness
CWE-601
Updated
2026-11-07
Show 4 moreShow less
OSVDEBIAN-CVE-2026-122132 5.1

go-chi chi 5.2.2 through 5.5.0 contains an open redirect vulnerability in the RedirectSlashes middleware that allows attackers to redirect victims to external hosts by embedding tab characters in request paths. Attackers can craft links with a URL-encoded tab, which browsers strip from the 301 Location header and resolve as a protocol-relative URL, bypassing the fix for CVE-2025-69725.

Record
DEBIAN-CVE-2026-122132
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Updated
2026-11-06
OSVGHSA-mqqf-5wvp-8fh8 4.7

chi has an open redirect vulnerability in the RedirectSlashes middleware

Summary

The RedirectSlashes function in middleware/strip.go does not perform correct input validation and can lead to an open redirect vulnerability.

Details

The RedirectSlashes function performs a Trim to all forward slash (/) characters, while prepending a single one at the begining of the path (Line 52).

However, it does not trim backslashes (\).

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: }

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).

The above make it possible for a response in the following form:

HTTP/1.1 301 Moved Permanently
Location: /\evil.com

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.

PoC

A minimal working example can be seen below.

package main

import (
	"fmt"
	"net/http"

	"github.com/go-chi/chi/v5"
	"github.com/go-chi/chi/v5/middleware"
)



func main() {
	r := chi.NewRouter()

	r.Use(middleware.RedirectSlashes)

	r.Get("/*", func(w http.ResponseWriter, r *http.Request) {
		w.WriteHeader(http.StatusOK)
	})

	fmt.Println("Server starting on port 8081...")
	if err := http.ListenAndServe(":8081", r); err != nil {
		fmt.Printf("Error starting server: %v\n", err)
	}
}

And when we request the path /\evil.com (needs a second backslash or URL encoding in the terminal), the HTTP Redirect Location is just /\evil.com without any domain/Host information.

$ curl -I  localhost:8081/\\evil.com/
HTTP/1.1 301 Moved Permanently
Content-Type: text/html; charset=utf-8
Location: /\evil.com
$ curl -I  localhost:8081/%5Cevil.com/
HTTP/1.1 301 Moved Permanently
Content-Type: text/html; charset=utf-8
Location: /\evil.com

This opened in a browser (Chrome, Firefox) will result in a transformation to //evil.com which in turn will result in a redirect to evil.com. <img width="200" alt="image-20250829115619807" src="https://github.com/user-attachments/assets/44aedad1-64b6-4660-8b26-fad9b4eca036" />

<img width="200" alt="image-20250829115632067" src="https://github.com/user-attachments/assets/b976d47d-1975-469c-abd3-deb907a68db2" />

Impact

This essentially consists of an open redirect vulnerability, provided that victim users use the most popular browsers (Chrome, Firefox, etc. It does not work in e.g. Safari).

The attacker can construct a malicious URL on a domain of a legitimate website and send it to the victim user. The victim users thinking that they will click on a legitimate website's URL, they will unknowingly be reidrected to an attacker controlled website.

This can lead to credential theft if the victim gets redirected to a phishing website, to malware that is hosted on the attacker controlled website etc. Also, it has a greate reputation / business impact for the affected legitimate website.

In order to exploit this vulnerability the attacker does not need to be authenticated or have ay other priviledge / knowledge regarding the affected application.

CVSS Score: 4.7 (Medium)

Record
GHSA-mqqf-5wvp-8fh8
CVSS 3.1
4.7 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
Weakness
CWE-601
Updated
2026-11-05
OSVUBUNTU-CVE-2026-122132 5.1

go-chi chi 5.2.2 through 5.5.0 contains an open redirect vulnerability in the RedirectSlashes middleware that allows attackers to redirect victims to external hosts by embedding tab characters in request paths. Attackers can craft links with a URL-encoded tab, which browsers strip from the 301 Location header and resolve as a protocol-relative URL, bypassing the fix for CVE-2025-69725.

Record
UBUNTU-CVE-2026-122132
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-06
OSVGO-2026-4316 No score

Open redirect vulnerability in the RedirectSlashes middleware in github.com/go-chi/chi

Open redirect vulnerability in the RedirectSlashes middleware in github.com/go-chi/chi

Record
GO-2026-4316
Updated
2026-11-05

Affected products

Affected packages

Affected packages
PackageAffectedFixed
golang-github-go-chi-chi
Debian:14
All versions, plus listed versions
5.2.0-15.2.3-15.2.5-15.3.0-1
None known
github.com/go-chi/chi/v5
Go
From an advisory covering 2 CVEs
5.2.2 up to 5.2.4
5.2.4
github.com/go-chi/chi
Go
From an advisory covering 2 CVEs
All versions None known
github.com/go-chi/chi/v2
Go
From an advisory covering 2 CVEs
All versions None known
github.com/go-chi/chi/v3
Go
From an advisory covering 2 CVEs
All versions None known
github.com/go-chi/chi/v4
Go
From an advisory covering 2 CVEs
All versions None known
golang-github-go-chi-chi
Ubuntu:22.04:LTS
All versions, plus listed versions
1.5.1-25.0.7-1
None known
golang-github-go-chi-chi
Ubuntu:24.04:LTS
All versions, plus listed versions
5.0.7-1
None known
golang-github-go-chi-chi
Ubuntu:26.10
All versions, plus listed versions
5.2.3-15.3.0-1
None known
golang-github-go-chi-chi
Ubuntu:26.04:LTS
All versions, plus listed versions
5.2.0-15.2.3-1
None known

History

History
RecordedChangedSources
affected, facts
affected, aliases, referencesEUVD, NVD, OSV
referencesCVE List
affected, aliases, facts, published, referencesOSV
publishedEUVD
publishedEUVD, NVD
aliases, publishedEUVD
first indexedCVE List, GitHub Advisories

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-122132 is a medium vulnerability (CVSS 5.1) in Go-chi Chi, published January 14, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.27%, the 19th percentile. No source names a fixed version.

References

Show 9 moreShow less
MoveEnter Open