CVE-2026-72817: 
Prometheus vulnerability analysis and mitigation

Overview

CVE-2026-72817 is an IP spoofing vulnerability in the RealIP middleware of the go-chi/chi Go web framework. The middleware resolves the request source IP (Request.RemoteAddr) by blindly trusting the first IP in the X-Forwarded-For header without validating whether the request originated from a trusted proxy. All versions from 0.9.0 up to (but not including) 5.3.0 are affected. The vulnerability was published on August 14, 2026, with a CVSS v3.1 score of 6.5 (Medium) and a CVSS v4.0 score of 6.9 (Medium) (GitHub Advisory, chi Security Advisory).

Technical details

The root cause is classified as CWE-345 (Insufficient Verification of Data Authenticity). The vulnerable RealIP() middleware implementation splits the X-Forwarded-For header by comma and uses the first IP as the authoritative client IP, without verifying that the request passed through a trusted proxy (chi Security Advisory). Because the X-Forwarded-For header is client-controlled, an attacker can prepend any arbitrary IP address as the first value; a legitimate proxy then appends the real client IP, but the server reads only the attacker-supplied first entry. The correct approach — as implemented by frameworks like labstack/echo — is to traverse the header from right to left, skipping known trusted proxy IPs, and treating the first untrusted IP as the real client source (chi Security Advisory). A public proof-of-concept is included in the security advisory, demonstrating exploitation with a simple curl command (chi Security Advisory).

Impact

Successful exploitation allows an unauthenticated network attacker to spoof the apparent source IP of any HTTP request processed by the vulnerable middleware. This can lead to bypass of IP-based access controls (e.g., allowlists or denylists enforced on Request.RemoteAddr) and falsification of request logs, undermining audit trails and forensic integrity. Availability is not impacted, but both confidentiality and integrity are partially affected — an attacker may gain unauthorized access to restricted resources or obscure their true identity in logs (GitHub Advisory, chi Security Advisory).

Exploitability

No evidence of active in-the-wild exploitation has been observed, and no weaponized exploit kits are known to incorporate this vulnerability (GitHub Advisory). A functional proof-of-concept is publicly available in the original security advisory, demonstrating the attack with a single curl command. The EPSS score is approximately 0.15%, indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. NVD's SSVC assessment classifies exploitation as "none" at this time, though the attack is rated as automatable (GitHub Advisory).

Exploitation steps

  1. Identify target: Locate a web application built with go-chi/chi versions 0.9.0–5.2.x that uses the RealIP middleware and enforces IP-based access controls or relies on Request.RemoteAddr for logging/authorization.
  2. Craft malicious request: Construct an HTTP request with a forged IP prepended to the X-Forwarded-For header, e.g., X-Forwarded-For: <spoofed-IP>, <real-client-IP>.
  3. Send request through a proxy: Route the request through any intermediary proxy (or send directly if no proxy validation is enforced). The proxy appends the real client IP, resulting in a header like X-Forwarded-For: 192.0.2.1, <actual-attacker-IP>.
  4. Trigger middleware processing: The RealIP() middleware reads the first IP (192.0.2.1) and sets it as Request.RemoteAddr, overwriting the true client IP.
  5. Bypass access control or falsify logs: The application now treats the forged IP as the client source, potentially granting access to IP-restricted resources or recording the false IP in audit logs.

Example curl command: curl http://target-app/ -H 'X-Forwarded-For: 192.0.2.1, <attacker-real-ip>' (chi Security Advisory).

Indicators of compromise

  • Network: HTTP requests containing X-Forwarded-For headers with multiple comma-separated IP addresses where the first IP is a known allowlisted or internal address, originating from unexpected external sources.
  • Logs: Application access logs showing Request.RemoteAddr values that are internal, loopback, or allowlisted IPs for requests that should not originate from those addresses; discrepancies between the TCP connection source IP and the logged client IP.
  • Logs: Repeated access to IP-restricted endpoints from IPs that appear on allowlists but are inconsistent with expected traffic patterns or geographic origin.
  • Application Behavior: Successful authentication or authorization for IP-restricted resources from unexpected network locations, particularly if the application logs show an allowlisted IP but network-layer logs show a different source.

Mitigation and workarounds

Upgrade go-chi/chi to version 5.3.0 or later, which fixes the RealIP middleware to properly validate trusted proxies before accepting X-Forwarded-For values (chi Security Advisory, GitHub Advisory). As a workaround prior to upgrading, configure upstream infrastructure (load balancers, reverse proxies) to strip or overwrite the X-Forwarded-For header before it reaches the application, ensuring only trusted proxy IPs can set this header. Additionally, avoid relying solely on Request.RemoteAddr for security-critical access control decisions without independent network-layer enforcement.

Community reactions

The vulnerability was originally reported by researcher convto and published by VojtechVitek via the go-chi/chi GitHub security advisory on May 22, 2026 (chi Security Advisory). Microsoft acknowledged the vulnerability in its Security Response Center update guide, reflecting its impact on Azure Linux packages (Microsoft MSRC). OpenSUSE also issued a security announcement addressing the vulnerability in its packages (GitHub Advisory). No significant broader media coverage or notable social media discussion has been identified beyond standard vulnerability database entries.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

golang-github-go-chi-chi

Affected

sid

golang-github-go-chi-chi: 5.3.0-1

Fixed

trixie

golang-github-go-chi-chi

Affected

Ubuntu

Unknown

devel

golang-github-go-chi-chi

Not Affected

jammy

golang-github-go-chi-chi

Unknown

jammy (esm-apps)

golang-github-go-chi-chi

Unknown

noble

golang-github-go-chi-chi

Unknown

noble (esm-apps)

golang-github-go-chi-chi

Unknown

resolute

golang-github-go-chi-chi

Unknown

resolute (esm-apps)

golang-github-go-chi-chi

Unknown

RHEL / CentOS

Affected

OpenShift

cri-o.src

Affected

RHEL 8

osbuild-composer.src

Affected

Source: This report was generated using AI

Related Prometheus vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-97032HIGH7.5
  • Go logoGo
  • gitlab-kas-19.2
NoYesOct 08, 2026
CVE-2026-97031HIGH7.5
  • Go logoGo
  • terraform-fips-1.13
NoYesOct 08, 2026
CVE-2026-119566MEDIUM6.3
  • Grafana logoGrafana
  • osbuild-composer-worker
NoYesOct 30, 2026
CVE-2026-97030MEDIUM6.1
  • Go logoGo
  • wait-for-port
NoYesOct 08, 2026
CVE-2026-94448MEDIUM6.1
  • Go logoGo
  • buildah-tests
NoYesOct 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management