---
id: CVE-2026-72815
title: >-
  go-chi chi versions >= 5.2.1 and before 5.3.0 contain an IP spoofing
  vulnerability in the RealIP middleware, which blindly trusts the first
  (leftmost) value of the X-Forwarded-For HTTP header
summary: >-
  go-chi chi versions >= 5.2.1 and before 5.3.0 contain an IP spoofing
  vulnerability in the RealIP middleware, which blindly trusts the first
  (leftmost) value of the X-Forwarded-For HTTP header. A remote attacker can
  bypass IP-based access…
severity: medium
cwe:
  - CWE-290
  - CWE-940
vendor: go-chi
product: github.com/go-chi/chi/v5/middleware
affected:
  - 'github.com/go-chi/chi/v5/middleware >= 5.2.1, < 5.3.0'
patched:
  - github.com/go-chi/chi/v5/middleware 5.3.0
published: '2026-08-14'
updated: '2026-09-24'
sourceUpdated: '2026-09-24T20:06:30.133'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-72815'
references:
  - url: 'https://github.com/go-chi/chi/security/advisories/GHSA-3fxj-6jh8-hvhx'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/go-chi-chi-ip-spoofing-via-x-forwarded-for-header
    label: disclosure@vulncheck.com
  - url: 'https://github.com/go-chi/chi/security/advisories/GHSA-3fxj-6jh8-hvhx'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
  - url: 'https://github.com/go-chi/chi'
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-72815.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-72815'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2515988'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-72815'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-72815'
  - url: 'https://access.redhat.com/errata/RHSA-2026:54420'
  - url: 'https://access.redhat.com/errata/RHSA-2026:50287'
  - url: 'https://access.redhat.com/errata/RHSA-2026:49718'
  - url: 'https://access.redhat.com/errata/RHSA-2026:49732'
tags:
  - nvd
  - exploit-available
  - osv
  - go
  - csaf
  - vex
  - red-hat
epss: 0.00495
epssPercentile: 0.39987
exploits:
  github: 1
  githubRepos:
    - 'https://github.com/Saku0512/CVE-2026-72815-poc'
  checkedAt: '2026-09-27T10:33:58.234Z'
exploitAvailable: true
aliases:
  - GHSA-3fxj-6jh8-hvhx
  - GO-2026-5774
ecosystem: go
ingestedAt: '2026-08-15T19:19:53.519Z'
cvss: 6.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N'
cvssSource: vendor
---

## Overview

go-chi chi versions >= 5.2.1 and before 5.3.0 contain an IP spoofing vulnerability in the RealIP middleware, which blindly trusts the first (leftmost) value of the X-Forwarded-For HTTP header. A remote attacker can bypass IP-based access control lists and rate-limiting mechanisms, and forge log entries, by supplying a spoofed IP address in the X-Forwarded-For header. The issue is fixed in version 5.3.0.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-72815)

Affected packages:

- `github.com/go-chi/chi/v5/middleware >= 5.2.1, < 5.3.0`

Patched in:

- `github.com/go-chi/chi/v5/middleware 5.3.0`

Source: https://osv.dev/vulnerability/GHSA-3fxj-6jh8-hvhx

## Vendor advisories

- **RHSA-2026:54420** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-08-12 · [advisory](https://access.redhat.com/errata/RHSA-2026:54420)
- **RHSA-2026:50287** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-08-04 · [advisory](https://access.redhat.com/errata/RHSA-2026:50287)
- **RHSA-2026:49718** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-08-03 · [advisory](https://access.redhat.com/errata/RHSA-2026:49718)
- **RHSA-2026:49732** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-08-03 · [advisory](https://access.redhat.com/errata/RHSA-2026:49732)
- **Red Hat VEX** · Moderate · affected: Cryostat 4, External Secrets Operator for Red Hat OpenShift, Gatekeeper 3, Migration Toolkit for Applications 8, OpenShift Pipelines, Red Hat Advanced Cluster Management for Kubernetes 2, … · no fix planned: Red Hat Trusted Artifact Signer, Zero Trust Workload Identity Manager - Tech Preview, Cryostat 4, External Secrets Operator for Red Hat OpenShift, … · updated 2026-09-25 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-72815.json)
