Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify chi application with RealIP middleware enabled
-
DeliveryCraft request with forged IP prepended to X-Forwarded-For
-
ExploitRoute request through any upstream proxy or load balancer
-
ExecutionMiddleware reads leftmost forged IP as client source
-
PersistRequest.RemoteAddr set to attacker-controlled value
-
ImpactBypass IP-based access control and access restricted resource
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Data authenticity verification
|
| Exploitation Conditions | Exploitation requires three specific conditions to be present simultaneously. First, the application must explicitly register middleware.RealIP() in its chi middleware chain - this middleware is not enabled by default and must be intentionally added by the developer. Second, the application must use Request.RemoteAddr (after the middleware rewrites it) to make security-relevant decisions such as IP allowlist enforcement, rate limiting by IP, or trust boundary determination. Third, the request must traverse at least one intermediary proxy or load balancer that passes or appends to the X-Forwarded-For header, providing cover for the attacker's prepended forged IP. Limiting factors: applications using RealIP solely for non-security audit logging have no access control bypass exposure; direct TCP connections without proxies reduce but do not eliminate spoofing if the attacker controls network-layer routing; and the vulnerability is present only in the specific middleware.RealIP() function, not in chi's core routing logic. |
| Impact | The CVSS 4.0 base score of 6.9 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L) correctly reflects unauthenticated, low-complexity network exploitation with limited but real integrity and confidentiality impact. Real-world risk is conditional on deployment patterns: exploitation is only meaningful when the application both enables middleware.RealIP() and uses the resolved IP for security decisions such as allowlist enforcement or trusted-zone gating. Applications using it solely for non-security logging face log falsification risk but no access control bypass. A public PoC lowers the exploitation bar to commodity level - any attacker who can send HTTP requests with custom headers can attempt this. No CISA KEV listing and no EPSS score were provided in the source intelligence, so large-scale automated exploitation is not confirmed. For applications enforcing IP-based access controls, the effective risk is higher than the 6.9 score suggests because the bypass is trivial and requires no special tooling. |
| Exploit ScenarioDerived | An attacker targets a Go microservice using chi's RealIP middleware to enforce an IP allowlist on an administrative API endpoint. The attacker sends an HTTP request with the header 'X-Forwarded-For: 10.10.1.5, <attacker-ip>', where 10.10.1.5 is a known permitted internal address. The chi middleware extracts the leftmost value, rewrites Request.RemoteAddr to 10.10.1.5, and the allowlist check passes - granting the attacker access to the restricted endpoint without ever holding a permitted IP. The published PoC in GHSA-9g5q-2w5x-hmxf demonstrates this with a two-line curl command requiring no special tooling. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 14, 2026
IP spoofing in go-chi's RealIP middleware allows unauthenticated network attackers to forge the apparent client source IP by prepending an arbitrary value to the X-Forwarded-For header, because the middleware blindly trusts the leftmost entry rather than walking the header right-to-left past trusted proxies. Applications that use middleware.RealIP() for IP-based access control or audit logging are directly exposed across all major version branches (v1 through v5 before 5.3.0). A working proof-of-concept is published in the GitHub Security Advisory GHSA-9g5q-2w5x-hmxf; no CISA KEV listing at time of analysis.
RemediationAI
For v5 users, upgrade github.com/go-chi/chi/v5 to version 5.3.0 or later per the CVE description; verify the release tag against the chi changelog at https://github.com/go-chi/chi/security/advisories/GHSA-9g5q-2w5x-hmxf before deploying, as the GHSA source data lists 'fixed in: None' for all packages - this discrepancy should be confirmed independently. For users of v1 through v4, no upstream patch is confirmed in the available data; migration to v5.3.0+ is the recommended long-term path. As an immediate compensating control, remove middleware.RealIP() from the middleware chain if IP resolution from XFF is not strictly required - this eliminates the attack surface entirely with no side effects unless other middleware or handlers depend on the rewritten RemoteAddr. If RealIP behavior is required, implement a custom middleware that maintains an explicit trusted-proxy CIDR allowlist and resolves the client IP by walking XFF from right to left, skipping known proxy addresses. Note that removing RealIP causes Request.RemoteAddr to reflect the immediate connection peer (typically a load balancer IP), which may break downstream logic that expects a real client IP.
Affected VersionsENISA
Affected Packages
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
go-chi/chi is a lightweight, composable Go HTTP router (cpe:2.3:a:go-chi:chi:*:*:*:*:*:*:*:*) widely adopted in Go web development. Its RealIP middleware resolves the true client IP from the X-Forwarded-For (XFF) HTTP header, a standard header appended by reverse proxies and load balancers. The root cause maps to CWE-345 (Insufficient Verification of Data Authenticity): the middleware splits the XFF header on commas and uses the first (leftmost) value without maintaining a trusted-proxy list or direction-aware traversal. Because HTTP clients can freely set or prepend values to XFF before a proxy appends the real connection IP, the leftmost entry is fully attacker-controlled. The correct algorithm - demonstrated by labstack/echo (ip.go L261-273) and cited in the advisory - traverses XFF from right to left, skips IPs belonging to known trusted proxies, and treats the first untrusted IP as the actual client. The chi implementation at middleware/realip.go L50-54 (v5.1.0 reference) performs no such validation.
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
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
Network-exploitable with no authentication as any HTTP client can forge XFF headers; limited C and I impact bounded by what the application does with the spoofed IP.
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
go-chi/chi versions 0.9.0 before 5.3.0 contains an IP spoofing vulnerability in the RealIP middleware, which resolves the request source IP (Request.RemoteAddr) using the first IP in the X-Forwarded-For header without validating trusted proxies. A malicious client can prepend a forged IP as the first value of the X-Forwarded-For header to spoof the request source IP, potentially bypassing access controls or falsifying request logs.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
IP spoofing via the RealIP middleware in go-chi/chi (versions 5.2.1 through 5.2.x) allows unauthenticated remote attacke
IP spoofing in go-chi/chi's RealIP middleware through version 5.2.1 enables unauthenticated remote attackers to inject a
IP spoofing in Go Chi before 5.4.0 allows an unauthenticated client that can reach the Go server directly to forge its a
Open redirect in chi (go-chi/chi) versions before 5.2.2 allows Host header injection via the RedirectSlashes middleware,
Same technique Authentication Bypass
View allVendor 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 |
| SUSE Linux Enterprise Module for Basesystem 15 SP7 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP7 | Affected |
| SUSE Linux Enterprise Module for HPC 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Server 16.0 | Affected |
| SUSE Linux Enterprise Server 16.0 | Affected |
| SUSE Linux Enterprise Server 16.0 | Affected |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| openSUSE Leap 16.0 | Affected |
| openSUSE Leap 16.0 | Affected |
| openSUSE Leap 16.0 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP4 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP4 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP6 | Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP6 | Affected |
| SUSE Linux Enterprise Module for HPC 15 SP5 | Affected |
| SUSE Linux Enterprise Module for HPC 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP4 | Affected |
| SUSE Linux Enterprise Server 15 SP4 | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5 | Affected |
| SUSE Linux Enterprise Server 15 SP5 | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE Manager Proxy 4.3 | Affected |
| SUSE Manager Proxy 4.3 | Affected |
| SUSE Manager Proxy LTS 4.3 | Affected |
| SUSE Manager Proxy LTS 4.3 | Affected |
| SUSE Manager Retail Branch Server 4.3 | Affected |
| SUSE Manager Retail Branch Server 4.3 | Affected |
| SUSE Manager Retail Branch Server LTS 4.3 | Affected |
| SUSE Manager Retail Branch Server LTS 4.3 | Affected |
| SUSE Manager Server 4.3 | Affected |
| SUSE Manager Server 4.3 | Affected |
| SUSE Manager Server LTS 4.3 | Affected |
| SUSE Manager Server LTS 4.3 | Affected |
| SUSE Linux Enterprise Desktop 15 SP4 | Affected |
| SUSE Linux Enterprise Desktop 15 SP4 | Affected |
| SUSE Linux Enterprise Desktop 15 SP5 | Affected |
| SUSE Linux Enterprise Desktop 15 SP5 | Affected |
| SUSE Linux Enterprise Desktop 15 SP6 | Affected |
| SUSE Linux Enterprise Desktop 15 SP6 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Affected |
| SUSE Linux Enterprise Real Time 15 SP4 | Affected |
| SUSE Linux Enterprise Real Time 15 SP4 | Affected |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
| openSUSE Leap 15.6 | Affected |
| openSUSE Leap 15.6 | Affected |
| suse/cosign | Affected |
EUVD-2026-58632
GHSA-9f4g-6whf-f3pv
NVD
CVE.org
EPSS
VulDB
Exploit-DB