Skip to main content

go-chi chi EUVDEUVD-2026-58632

| CVE-2026-72817 MEDIUM
Insufficient Verification of Data Authenticity (CWE-345)
2026-08-14 VulnCheck GHSA-9f4g-6whf-f3pv
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Identify chi application with RealIP middleware enabled
  2. Delivery
    Craft request with forged IP prepended to X-Forwarded-For
  3. Exploit
    Route request through any upstream proxy or load balancer
  4. Execution
    Middleware reads leftmost forged IP as client source
  5. Persist
    Request.RemoteAddr set to attacker-controlled value
  6. Impact
    Bypass 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% 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'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

chi 0.9.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

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

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-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.

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

EPSS Score
0.1%
Top 95% exploitable
Prevalence
Medium
popular Go HTTP router, footprint limited to Go-based web services
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.1%
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