---
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
cvss: 6.9
cvssVector: 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N'
cwe:
  - CWE-290
  - CWE-940
vendor: go-chi
product: chi
affected:
  - chi >= 5.2.1 < 5.3.0
patched:
  - github.com/go-chi/chi/v5/middleware 5.3.0
published: '2026-08-14'
updated: '2026-10-08'
sourceUpdated: '2026-10-08T16:17:35.650'
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'
  - url: 'https://github.com/go-chi/chi/pull/967'
  - url: >-
      https://github.com/go-chi/chi/commit/3b171578ca44dfd75ca3c5cbddc7b44c600a7b49
tags:
  - nvd
  - cve.org
  - exploit-available
  - osv
  - go
  - csaf
  - vex
  - red-hat
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'yes'
  technicalImpact: partial
  timestamp: '2026-08-18T01:54:58.560637Z'
cvssSource: cna
epss: 0.00495
epssPercentile: 0.42585
exploits:
  github: 1
  githubRepos:
    - 'https://github.com/Saku0512/CVE-2026-72815-poc'
  checkedAt: '2026-11-05T15:51:23.427Z'
aliases:
  - GHSA-3fxj-6jh8-hvhx
  - GO-2026-5774
ecosystem: go
scores:
  cna: 6.9
  vendor: 6.5
ingestedAt: '2026-08-15T19:19:53.519Z'
---

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