Description
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.
Published: 2026-08-14
Score: 6.9 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The RealIP middleware in go-chi chi versions 5.2.1 through 5.2.x blindly trusts the first value of the X-Forwarded-For HTTP header. Because the header value is not validated, the middleware accepts any spoofed address supplied by an external client, allowing an attacker to impersonate another IP address. This flaw enables the attacker to bypass IP‑based access controls, evade rate limits, and create false log entries, thereby compromising confidentiality, integrity, and availability of services that rely on accurate client IPs. The weakness is classified as a CWE‑290 instance of improper restriction of API privileges.

Affected Systems

go‑chi chi is affected. The vulnerability applies to all installed releases from 5.2.1 up to, but not including, 5.3.0. Users running any of these versions use the default RealIP middleware configuration that trusts all X‑Forwarded‑For values.

Risk and Exploitability

The CVSS score of 6.9 indicates a moderate severity, and the EPSS score is not available, suggesting that limited exploitation data is publicly known. The issue is not listed in the CISA KEV catalog. As the flaw stems from the blind trust of a request header, the attack is likely remote via HTTP traffic to any exposed service that uses the RealIP middleware. Attackers need only craft an HTTP request bearing a forged X‑Forwarded‑For header; if the target application performs IP‑based filtering or logging based on the derived address, the attacker can subvert those controls. No additional privileged access or code execution is required, but the potential to bypass security mechanisms makes it a credible threat to production deployments.

Generated by OpenCVE AI on August 14, 2026 at 12:28 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to go‑chi chi 5.3.0 or later, which contains the fix for the X‑Forwarded‑For handling.
  • If an upgrade cannot be performed immediately, reconfigure the RealIP middleware to trust no client‑supplied addresses or to accept only values from known, trusted proxy IPs.
  • Modify access‑control lists and rate‑limiting logic to reference the original remote address instead of the value exposed by the RealIP middleware.
  • Ensure that any logging mechanisms use the validated source IP from the middleware rather than raw input, preventing forged log entries.

Generated by OpenCVE AI on August 14, 2026 at 12:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 14 Aug 2026 13:00:00 +0000

Type Values Removed Values Added
First Time appeared Go-chi
Go-chi chi
Vendors & Products Go-chi
Go-chi chi

Fri, 14 Aug 2026 11:45:00 +0000

Type Values Removed Values Added
Description 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.
Title go-chi chi v5.2.1 IP Spoofing via X-Forwarded-For Header
Weaknesses CWE-290
References
Metrics cvssV4_0

{'score': 6.9, 'vector': '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-14T11:35:27.496Z

Reserved: 2026-08-10T15:12:16.754Z

Link: CVE-2026-72815

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-14T12:16:44.507

Modified: 2026-08-14T12:16:44.507

Link: CVE-2026-72815

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-14T12:45:17Z

Weaknesses
  • CWE-290

    Authentication Bypass by Spoofing