CVE-2026-72815

go-chi chi v5.2.1 IP Spoofing via X-Forwarded-For Header

Published Aug 14, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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 or CWE-940 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 of 0.00397 (0.397%) indicates a low likelihood of exploitation, 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.

Remediation

No solution or workaround provided in the CVE record.

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 22, 2026 at 10:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-940
References
Metrics threat_severity

None

cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N'}

threat_severity

Moderate

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Go-chi
Go-chi chi
Vendors & Products Go-chi
Go-chi chi
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'}

Weaknesses
  • CWE-290

    Authentication Bypass by Spoofing

  • CWE-940

    Improper Verification of Source of a Communication Channel

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 8, 2026, 3:24 PM
Reserved
Aug 10, 2026, 3:12 PM
Status
Deferred
Published
Aug 14, 2026, 12:16 PM
Modified
Oct 8, 2026, 4:17 PM
Severity
Moderate
Public date
Aug 14, 2026, 11:35 AM