Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/go-chi/chi/v5
  4. ›
  5. GHSA-3fxj-6jh8-hvhx

GHSA-3fxj-6jh8-hvhx: chi Has an IP Spoofing Vulnerability in `middleware.RealIP`

June 25, 2026 (updated November 4, 2026)

The RealIP middleware in go-chi/chi is vulnerable to IP spoofing because it blindly trusts the first (leftmost) element of the X-Forwarded-For HTTP header. This allows a remote attacker to bypass IP-based access control lists (ACLs) and rate-limiting mechanisms by providing a spoofed IP address in the header.

References

  • github.com/advisories/GHSA-3fxj-6jh8-hvhx
  • github.com/go-chi/chi/commit/3b171578ca44dfd75ca3c5cbddc7b44c600a7b49
  • github.com/go-chi/chi/pull/967
  • github.com/go-chi/chi/security/advisories/GHSA-3fxj-6jh8-hvhx

Code Behaviors & Features

Detect and mitigate GHSA-3fxj-6jh8-hvhx with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 5.2.1 before 5.3.0

Fixed versions

  • 5.3.0

Solution

Upgrade to version 5.3.0 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-290: Authentication Bypass by Spoofing
  • CWE-345: Insufficient Verification of Data Authenticity

Source file

go/github.com/go-chi/chi/v5/GHSA-3fxj-6jh8-hvhx.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:33 +0000.