Skip to main content

go-chi chi CVE-2026-72815

| EUVDEUVD-2026-58630 MEDIUM
Authentication Bypass by Spoofing (CWE-290)
2026-08-14 VulnCheck GHSA-qgxv-hqxp-4rcx
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send HTTP request with spoofed X-Forwarded-For header
  2. Delivery
    RealIP middleware extracts leftmost (attacker-controlled) value
  3. Exploit
    r.RemoteAddr overwritten with spoofed IP
  4. Execution
    Application IP-ACL evaluates forged address
  5. Persist
    ACL or rate-limit bypass achieved
  6. Impact
    Access restricted resource or evade throttling

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Anti-spoofing controls
MITRE ATT&CK

1 technique across 1 tactic: Defense Evasion

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires two simultaneous conditions: first, the application must explicitly register middleware.RealIP in its chi router chain (r.Use(middleware.RealIP)); second, the application must implement access controls - IP-based ACLs, rate limiting, or audit logging - that rely on r.RemoteAddr or r.Request.RemoteAddr as overwritten by the middleware. Applications that do not use middleware.RealIP, or that use it but perform no IP-based gating, are not exploitable. No authentication is required and no non-default configuration is needed on the attacker side - the attack requires only the ability to send an HTTP request with a custom header. Exploitation is further limited to chi versions 5.2.1 through 5.2.x; both older chi v4 deployments and updated 5.3.0 deployments are unaffected.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) reflects a straightforward, unauthenticated, low-complexity network attack with no prerequisites beyond sending an HTTP request - the lowest possible exploitation barrier. The scored impact is limited (VC:L/VI:L/VA:N), correctly capturing that the attack does not yield remote code execution or data exfiltration directly but enables ACL bypass and rate-limit evasion, which are themselves enablers for follow-on attacks. No EPSS data was supplied; however, given the public POC in the GHSA advisory and the trivial nature of the exploit (a single HTTP header), opportunistic exploitation of exposed endpoints is realistic wherever the middleware is deployed with IP-based controls. The vulnerability is NOT in CISA KEV, suggesting no confirmed widespread exploitation at this time. Real-world severity is context-dependent: applications that rely on chi's RealIP middleware for access control face meaningful risk, while those that do not use IP-based gating are functionally unaffected despite the vulnerability existing in the dependency.

Exploit ScenarioDerived

An attacker targeting an IP-restricted chi endpoint sends a GET /admin/secret HTTP request with the header 'X-Forwarded-For: 1.2.3.4' (an allowlisted administrator IP) from their own arbitrary IP. The RealIP middleware overwrites r.RemoteAddr with '1.2.3.4', causing the application's IP-ACL check to succeed and granting access to the restricted resource. A working proof-of-concept demonstrating this bypass is published in the GHSA advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 14, 2026

IP spoofing via the RealIP middleware in go-chi/chi (versions 5.2.1 through 5.2.x) allows unauthenticated remote attackers to bypass IP-based access control lists, circumvent rate-limiting mechanisms, and forge log entries by prepending a fabricated address to the X-Forwarded-For HTTP header. A proof-of-concept is included in the GitHub security advisory (GHSA-3fxj-6jh8-hvhx), confirming exploitability against any chi application that enables the RealIP middleware and enforces controls based on the overwritten r.RemoteAddr. No active exploitation has been confirmed in CISA KEV at time of analysis.

RemediationAI

Upgrade go-chi/chi to version 5.3.0, which fixes the vulnerability by no longer blindly trusting the leftmost X-Forwarded-For value. Run 'go get github.com/go-chi/chi/v5@v5.3.0' and update go.sum accordingly. The fix is confirmed in the upstream advisory at https://github.com/go-chi/chi/security/advisories/GHSA-3fxj-6jh8-hvhx. If an immediate upgrade is not possible, the most effective compensating control is to remove or bypass the middleware.RealIP registration (r.Use(middleware.RealIP)) and implement your own trusted-proxy-aware IP extraction that walks the X-Forwarded-For list right-to-left, stopping at the first IP not belonging to a known trusted proxy CIDR. Alternatively, enforce IP-based access control at the reverse proxy or load-balancer layer (e.g., nginx allow/deny or AWS security groups) rather than in application code, so forged headers never influence the control plane. Note: removing RealIP entirely may cause application logic that depends on r.RemoteAddr to see proxy IPs instead of client IPs, requiring code-level adjustments.

Affected VersionsENISA

chi 5.2.1 <5.3.0

Affected Packages

go github.com/go-chi/chi/v5 fix: 5.3.0
go github.com/go-chi/chi/v5/middleware fix: 5.3.0
euvd chi fix: 5.3.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

go-chi/chi is a lightweight, idiomatic Go HTTP router widely used for building REST APIs and microservices. The vulnerable component is middleware/realip.go, which implements the RealIP middleware (CWE-290: Authentication Bypass by Spoofing). The flaw lies in the realIP() function: it reads the X-Forwarded-For header and extracts only the first comma-separated (leftmost) value via strings.Cut(xff, ','), then overwrites r.RemoteAddr with it. Per RFC 7239 and industry practice, each reverse proxy appends the connecting client IP to the right of X-Forwarded-For - making the leftmost value fully attacker-controlled because clients can freely set this header before it reaches any proxy. Correct implementations must trust only the rightmost IP injected by a known, trusted proxy. The affected CPE is cpe:2.3:a:go-chi:chi:*:*:*:*:*:*:*:*, versions >= 5.2.1 and < 5.3.0.

Know when Chi gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 6.9 MEDIUM
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
vuln.today AI 6.5 MEDIUM

Network-accessible, no complexity or privilege needed; impacts are limited to ACL bypass and log forgery with no availability consequence.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
SUSE 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Red Hat 6.5 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Aug 14, 2026 - 13:01 EUVD

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.4%
Top 67% exploitable
Prevalence
Medium
popular Go HTTP router, common in Go microservice ecosystems
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy