Skip to main content

go-chi chi EUVDEUVD-2026-58631

| CVE-2026-72816 MEDIUM
Authentication Bypass by Spoofing (CWE-290)
2026-08-14 VulnCheck GHSA-xg24-pmhh-m4m9
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 overwrites r.RemoteAddr unconditionally
  3. Exploit
    Application evaluates spoofed IP for access control
  4. Execution
    IP-based restriction bypassed entirely
  5. Impact
    Attacker reaches restricted endpoint or evades rate limit

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

The application must explicitly register the middleware.RealIP middleware in its chi router (r.Use(middleware.RealIP) or equivalent per-route usage). The security impact only materializes when the application enforces access controls, rate limiting, geo-IP filtering, or security-relevant audit logging based on r.RemoteAddr after the middleware has rewritten it. No authentication, privileged network position, or non-default OS or server configuration is required; any remote HTTP client with the ability to send arbitrary request headers can exploit this condition. Exploitation is limited to deployments that both use the middleware.RealIP middleware AND make security decisions based on r.RemoteAddr; applications that do not use IP-based security logic are not affected by the access control bypass, though audit log integrity is still compromised.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) confirms unauthenticated, network-accessible exploitation requiring no special attack conditions, yielding a score of 6.9. Real-world severity is heavily context-dependent: applications that use r.RemoteAddr only for logging suffer audit log pollution, while those enforcing IP-based access controls or rate limits face a complete security bypass with a single curl command. A public, functional POC requiring no tooling or specialized knowledge is confirmed in the GHSA advisory, meaning even a mid-sized municipal IT team in legnica operating a chi-based Go service with IP-based admin controls should treat this as an urgent remediation item rather than a deferred patch. EPSS data is not provided in the available intelligence; however, the near-zero exploitation complexity and immediately available POC suggest a materially elevated real-world exploitation probability relative to the nominal CVSS score. The vulnerability is not currently listed in the CISA KEV catalog, so confirmed active exploitation is not established - but the low barrier distinguishes this from the class of high-CVSS-but-unlikely-to-be-exploited findings.

Exploit ScenarioDerived

An attacker targeting a chi-based Go application that restricts its /admin route to localhost (r.RemoteAddr == "127.0.0.1") sends a standard HTTP GET request with the header X-Forwarded-For: 127.0.0.1; the RealIP middleware overwrites r.RemoteAddr before the handler executes, causing the IP check to evaluate the attacker-supplied loopback address and return the protected content. A functional POC demonstrating exactly this bypass - a single curl command with no special tooling - is publicly available in GHSA-rjr7-jggh-pgcp.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% 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 in go-chi/chi's RealIP middleware through version 5.2.1 enables unauthenticated remote attackers to inject arbitrary values into the True-Client-IP, X-Real-IP, or X-Forwarded-For headers, which the middleware blindly accepts and uses to overwrite r.RemoteAddr without any trusted-proxy verification. Applications that rely on r.RemoteAddr for IP-based access controls, rate limiting, or geo-IP restrictions are directly bypassed, and audit logs are silently corrupted with attacker-chosen addresses. A public proof-of-concept is confirmed in the GitHub Security Advisory GHSA-rjr7-jggh-pgcp; no CISA KEV listing at time of analysis.

RemediationAI

Upgrade go-chi/chi v5 to version 5.3.0 or later, which is the only confirmed fix; this release introduces trusted-proxy CIDR validation before the middleware accepts any forwarded IP header. For applications on the v1-v4 module branches, patched versions are not confirmed from available data - operators on those branches should evaluate migrating to v5.3.0 or apply compensating controls immediately. The most conservative compensating control is removing the middleware.RealIP middleware entirely and deriving client IP only from the direct TCP connection (r.RemoteAddr before any middleware rewriting); this eliminates spoofing but also breaks legitimate proxy IP forwarding, which may affect applications behind load balancers. Alternatively, operators can implement a custom trusted-proxy allowlist prior to the RealIP middleware, rejecting forwarded IP headers unless the connecting peer IP falls within known proxy CIDRs (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 for internal infrastructure - adjust to match actual topology). Do not rely on network-layer egress filtering alone to protect IP-based access logic if middleware.RealIP is present. See https://github.com/go-chi/chi/security/advisories/GHSA-rjr7-jggh-pgcp for the official advisory.

Affected VersionsENISA

chi 0 <5.3.0

Affected Packages

go github.com/go-chi/chi/middleware no fix
go github.com/go-chi/chi/v2/middleware no fix
go github.com/go-chi/chi/v3/middleware no fix
go github.com/go-chi/chi/v4/middleware no fix
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 7 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

The vulnerability resides in middleware/realip.go within the go-chi/chi Go HTTP router package (CPE: cpe:2.3:a:go-chi:chi:*:*:*:*:*:*:*:*). The RealIP middleware is a common pattern for extracting the originating client IP from reverse-proxy-forwarded headers and rewriting r.RemoteAddr so that downstream handlers see the client's address rather than the proxy's. The root cause (CWE-290: Authentication Bypass by Spoofing) is the complete absence of trusted-proxy CIDR verification: the realIP() function reads True-Client-IP first, then X-Real-IP, then the leftmost value of X-Forwarded-For, and immediately sets the remote address without confirming that the connecting TCP peer is a recognized reverse proxy. Because HTTP clients can freely set arbitrary request headers, the resulting r.RemoteAddr is fully attacker-controlled, turning a convenience middleware into a security liability in any deployment that enforces IP-based policy.

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 privileges or interaction required; limited confidentiality and integrity impact from access control bypass and log corruption; no availability impact.

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 through 5.2.1 contains an IP spoofing vulnerability in the RealIP middleware (middleware/realip.go). The realIP() function reads client-controlled headers (True-Client-IP, X-Real-IP, and X-Forwarded-For) and overwrites r.RemoteAddr without verifying that the request originated from a trusted proxy. Attackers can supply arbitrary IP addresses in these headers to bypass IP-based access controls, evade rate limiting and geo-IP restrictions, and pollute audit logs. Fixed in 5.3.0.

Threat Intelligence Overview

EPSS Score
0.2%
Top 87% exploitable
Prevalence
Medium
popular Go HTTP router widely adopted in Go microservice backends
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor GitHub VulDB

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.2%
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
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

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