{"id":"GHSA-rjr7-jggh-pgcp","revision":null,"records":[{"revision":"93aa1f8ebc924293aa7ad3c37769d066","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-72816","aliases":[],"title":"go-chi chi before 5.3.0 IP Spoofing via RealIP Middleware","description":"go-chi/chi through 5.2.1 contains an IP spoofing vulnerability in the RealIP middleware (middleware/realip.go). The realIP() function reads client-controlled headers (True-Client-IP, X-Real-IP, and X-Forwarded-For) and overwrites r.RemoteAddr without verifying that the request originated from a trusted proxy. Attackers can supply arbitrary IP addresses in these headers to bypass IP-based access controls, evade rate limiting and geo-IP restrictions, and pollute audit logs. Fixed in 5.3.0.","state":0,"publishedAt":"2026-08-14T11:35:28.145+00:00","modifiedAt":"2026-10-08T15:24:31.66+00:00","affected":[{"ecosystem":"Vendor product","name":"chi","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"go-chi\",\n                    \"product\": \"chi\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"packageURL\": \"pkg:golang/github.com/go-chi/chi/v5\",\n                    \"versions\": [\n                        {\n                            \"version\": \"0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"5.3.0\"\n                        },\n                        {\n                            \"version\": \"5.3.0\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 4.0","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","score":6.9,"severity":"MEDIUM"},{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"severity":"MEDIUM"}],"references":["https://github.com/go-chi/chi/security/advisories/GHSA-rjr7-jggh-pgcp","https://www.vulncheck.com/advisories/go-chi-chi-before-ip-spoofing-via-realip-middleware"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-72816","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-72816","identifiers":["CVE-2026-72816"]},"retained":false,"historicalAffected":[]},{"revision":"4658dcc9e20d4e18a3521873673e1412","observedAt":"2026-11-09T15:08:43.701+00:00","statement":{"source":"euvd","id":"EUVD-2026-58631","aliases":["CVE-2026-72816","GHSA-xg24-pmhh-m4m9"],"title":"go-chi/chi through 5.2.1 contains an IP spoofing vulnerability in the RealIP middleware (middleware/realip.go). The realIP() function reads client-controlled headers (True-Client-IP, X-Real-IP, and X-Forwarded-For) and overwrites r.RemoteAd…","description":"go-chi/chi through 5.2.1 contains an IP spoofing vulnerability in the RealIP middleware (middleware/realip.go). The realIP() function reads client-controlled headers (True-Client-IP, X-Real-IP, and X-Forwarded-For) and overwrites r.RemoteAddr without verifying that the request originated from a trusted proxy. Attackers can supply arbitrary IP addresses in these headers to bypass IP-based access controls, evade rate limiting and geo-IP restrictions, and pollute audit logs. Fixed in 5.3.0.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 4.0","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","score":6.9,"severity":null}],"references":["https://github.com/go-chi/chi/security/advisories/GHSA-rjr7-jggh-pgcp","https://www.vulncheck.com/advisories/go-chi-chi-before-ip-spoofing-via-realip-middleware"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-58631","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Aug 14, 2026, 11:35:28 AM","dateUpdated":"Oct 8, 2026, 3:24:31 PM"},"relatedAdvisories":[{"id":"RHSA-2026:49732","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update","vulnerabilityIds":["CVE-2026-72815","CVE-2026-72816","CVE-2026-72817"]},{"id":"msrc_CVE-2026-72816","title":"go-chi chi before 5.3.0 IP Spoofing via RealIP Middleware","vulnerabilityIds":["CVE-2026-72816"]},{"id":"openSUSE-SU-2026:21670-1","title":"Security update for cloudflared","vulnerabilityIds":["CVE-2026-72815","CVE-2026-72816","CVE-2026-72817"]},{"id":"openSUSE-SU-2026:21918-1","title":"Security update for warewulf4","vulnerabilityIds":["CVE-2026-34986","CVE-2026-72815","CVE-2026-72816","CVE-2026-72817"]},{"id":"openSUSE-SU-2026:21645-1","title":"Security update for trivy","vulnerabilityIds":["CVE-2026-72815","CVE-2026-72816","CVE-2026-72817"]},{"id":"RHSA-2026:49718","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update","vulnerabilityIds":["CVE-2026-72815","CVE-2026-72816","CVE-2026-72817"]},{"id":"RHSA-2026:54420","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update","vulnerabilityIds":["CVE-2026-72815","CVE-2026-72816","CVE-2026-72817"]},{"id":"openSUSE-SU-2026:21653-1","title":"Security update for v2ray-core","vulnerabilityIds":["CVE-2026-27017","CVE-2026-39821","CVE-2026-72815","CVE-2026-72816","CVE-2026-72817"]},{"id":"openSUSE-SU-2026:21793-1","title":"Security update for hauler","vulnerabilityIds":["CVE-2026-37236","CVE-2026-41178","CVE-2026-41888","CVE-2026-72815","CVE-2026-72816","CVE-2026-72817"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-58631","identifiers":["EUVD-2026-58631","CVE-2026-72816","GHSA-xg24-pmhh-m4m9"]},"retained":false,"historicalAffected":[]},{"revision":"d425c0def4044d2badaa3fa423d07223","observedAt":"2026-10-25T15:19:03.401+00:00","statement":{"source":"nvd","id":"CVE-2026-72816","aliases":[],"title":"go-chi/chi through 5.2.1 contains an IP spoofing vulnerability in the RealIP middleware (middleware/realip.go). The realIP() function reads client-controlled headers (True-Client-IP, X-Real-IP, and X-Forwarded-For) and overwrites r.RemoteAd…","description":"go-chi/chi through 5.2.1 contains an IP spoofing vulnerability in the RealIP middleware (middleware/realip.go). The realIP() function reads client-controlled headers (True-Client-IP, X-Real-IP, and X-Forwarded-For) and overwrites r.RemoteAddr without verifying that the request originated from a trusted proxy. Attackers can supply arbitrary IP addresses in these headers to bypass IP-based access controls, evade rate limiting and geo-IP restrictions, and pollute audit logs. Fixed in 5.3.0.","state":0,"publishedAt":"2026-08-14T12:16:44.62+00:00","modifiedAt":"2026-10-08T16:17:35.783+00:00","affected":[],"metrics":[{"system":"CVSS 4.0 · disclosure@vulncheck.com · Secondary","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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","score":6.9,"severity":"MEDIUM"},{"system":"CVSS 3.1 · disclosure@vulncheck.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"severity":"MEDIUM"}],"references":["https://github.com/go-chi/chi/security/advisories/GHSA-rjr7-jggh-pgcp","https://www.vulncheck.com/advisories/go-chi-chi-before-ip-spoofing-via-realip-middleware"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-72816","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-290"],"productCriteria":[],"sourceDates":{"published":"2026-08-14T12:16:44.620","lastModified":"2026-10-08T16:17:35.783"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-72816","identifiers":["CVE-2026-72816"]},"retained":false,"historicalAffected":[]},{"revision":"1e4109754fea4e7784cce71e38450ad8","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-rjr7-jggh-pgcp","aliases":["CVE-2026-72816","GO-2026-5777"],"title":"chi's RealIP Middleware allows IP spoofing via unvalidated X-Forwarded-For header","description":"### Summary\nrealip middleware in go-chi/chi trusts headers like x-forwarded-for without checking them, so attackers can fake their ip and bypass rate limits or access controls\n\n### Details\n\nthe vuln is in middleware/realip.go , the realIP() function pulls IPs straight from client headers and replaces r.RemoteAddr without checking if the request came from a trusted proxy\n\n```go\nfunc realIP(r *http.Request) string {\n    var ip string\n    if tcip := r.Header.Get(trueClientIP); tcip != \"\" {\n        ip = tcip  // controlled by attacker\n    } else if xrip := r.Header.Get(xRealIP); xrip != \"\" {\n        ip = xrip  // controlled by attacker\n    } else if xff := r.Header.Get(xForwardedFor); xff != \"\" {\n        ip, _, _ = strings.Cut(xff, \",\")  // controlled by attacker\n    }\n    // ...\n    return ip\n}\n```\n\nno trusted proxy cidr check in place, any client can send these headers\n\n### PoC\n\ncreate a server with chi and use realip middleware\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"net/http\"\n    \"github.com/go-chi/chi/v5\"\n    \"github.com/go-chi/chi/v5/middleware\"\n)\n\nfunc main() {\n    r := chi.NewRouter()\n    r.Use(middleware.RealIP)\n\n    r.Get(\"/admin\", func(w http.ResponseWriter, r *http.Request) {\n        // ip-based access control got bypassed\n        if r.RemoteAddr == \"127.0.0.1\" {\n            w.Write([]byte(\"SECRET ADMIN DATA\"))\n            return\n        }\n        http.Error(w, \"Forbidden\", 403)\n    })\n\n    http.ListenAndServe(\":8080\", r)\n}\n```\n\nspoofed the ip to bypass access control\n\n```bash\ncurl -H \"X-Forwarded-For: 127.0.0.1\" http://localhost:8080/admin\n```\n\n\n### Impact\n\n- ip-based access control bypass lets attackers reach restricted endpoints\n- rate limiting bypass lets attackers avoid limits by rotating spoofed ips\n- audit logs show fake ips picked by attacker instead of real ones\n- attackers can get around geo ip restrictions\n\n## Remediation Recommendation\n\nvalidate proxy cidr first before trusting forwarded ip headers\n\n```go\n// add your reverse proxy ip addresses here\nvar trustedProxies = []net.IPNet{\n       {IP: net.ParseIP(\"10.0.0.0\"), Mask: net.CIDRMask(8, 32)},\n    {IP: net.ParseIP(\"172.16.0.0\"), Mask: net.CIDRMask(12, 32)},\n    {IP: net.ParseIP(\"192.168.0.0\"), Mask: net.CIDRMask(16, 32)},\n}\n\nfunc isTrustedProxy(ip net.IP) bool {\n    for _, cidr := range trustedProxies {\n        if cidr.Contains(ip) {\n            return true\n        }\n    }\n    return false\n}\n```","state":0,"publishedAt":"2026-06-25T18:19:15+00:00","modifiedAt":"2026-09-10T03:50:50.3893362+00:00","affected":[{"ecosystem":"Go","name":"github.com/go-chi/chi/middleware","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"1.5.5"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/go-chi/chi/v2/middleware","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"2.1.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/go-chi/chi/v3/middleware","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"3.3.5"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/go-chi/chi/v4/middleware","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"4.1.3"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/go-chi/chi/v5/middleware","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"5.3.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/go-chi/chi/security/advisories/GHSA-rjr7-jggh-pgcp","https://github.com/go-chi/chi","https://github.com/go-chi/chi/releases/tag/v5.3.0"],"sourceUrl":"https://github.com/advisories/GHSA-rjr7-jggh-pgcp","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-rjr7-jggh-pgcp","identifiers":["GHSA-rjr7-jggh-pgcp","CVE-2026-72816","GO-2026-5777"]},"retained":false,"historicalAffected":[]},{"revision":"fd9acf006ac74845ab8c5098d1b660e2","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-5777","aliases":["CVE-2026-72816","GHSA-rjr7-jggh-pgcp"],"title":"Chi's RealIP Middleware allows IP spoofing via unvalidated X-Forwarded-For header in github.com/go-chi/chi","description":"Chi's RealIP Middleware allows IP spoofing via unvalidated X-Forwarded-For header in github.com/go-chi/chi","state":0,"publishedAt":"2026-07-24T18:35:55+00:00","modifiedAt":"2026-08-15T05:19:15.7565796+00:00","affected":[{"ecosystem":"Go","name":"github.com/go-chi/chi/v5","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"5.3.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/go-chi/chi/security/advisories/GHSA-rjr7-jggh-pgcp","https://github.com/go-chi/chi/pull/967","https://github.com/go-chi/chi/releases/tag/v5.3.0"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-5777","license":"OSV · upstream source license applies","key":"osv:GO-2026-5777","identifiers":["GO-2026-5777","CVE-2026-72816","GHSA-rjr7-jggh-pgcp"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-10T19:23:59.9183258+00:00","complete":true,"records":1773,"lastAttemptAt":"2026-11-10T19:23:59.9183258+00:00","lastSuccessAt":"2026-11-10T19:24:00.2370482+00:00","error":null,"lastVerifiedAt":"2026-11-10T19:24:00.2370549+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-8859cf40d4337e24bd2f258cc7778fbad01bb24c79d057aaf34cf1dfc6f8917d-f2f4ba314860e9e17a66947505579ed713f511b53a4762548045095e6e99afbd","complete":true,"records":422304,"lastAttemptAt":"2026-11-10T19:21:29.2484141+00:00","lastSuccessAt":"2026-11-10T19:21:28.9991659+00:00","error":null,"lastVerifiedAt":"2026-11-10T19:21:29.2484141+00:00","snapshotPublishedAt":"2026-11-10T18:26:14+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-acbb624a79c244aa868394151a25f053","complete":true,"records":13704,"lastAttemptAt":"2026-11-10T19:24:02.5081725+00:00","lastSuccessAt":"2026-11-10T18:24:12.001+00:00","error":null,"lastVerifiedAt":"2026-11-10T18:24:12.001+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13758,"expectedIdentifiers":13758,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-10T19:23:59.9183258+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-10T19:23:59.9183258+00:00","lastSuccessAt":"2026-11-10T19:24:00.2381624+00:00","error":null,"lastVerifiedAt":"2026-11-10T19:24:00.2381812+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-4459456b8f8c43778c308d7de0a43211","complete":true,"records":13710,"lastAttemptAt":"2026-11-10T19:24:01.780186+00:00","lastSuccessAt":"2026-11-10T18:24:11.141+00:00","error":null,"lastVerifiedAt":"2026-11-10T18:24:11.141+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13758,"expectedIdentifiers":13758,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-50a085e5b7a5d1546eabdb7e52fab85d658afa8554d3cf95a0891c49d83f2979","complete":true,"records":9935,"lastAttemptAt":"2026-11-10T19:23:59.6188503+00:00","lastSuccessAt":"2026-11-10T16:25:20.0114252+00:00","error":null,"lastVerifiedAt":"2026-11-10T19:23:59.6188503+00:00","snapshotPublishedAt":"2026-11-10T16:18:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-26503967ae4379db8f374089589d6e03fb15bd31f820c9e992aaf93840c2236c","complete":true,"records":1971,"lastAttemptAt":"2026-11-10T19:21:29.467842+00:00","lastSuccessAt":"2026-11-09T21:02:20.472473+00:00","error":null,"lastVerifiedAt":"2026-11-10T19:21:29.467842+00:00","snapshotPublishedAt":"2026-11-09T20:18:18+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-df497239f2f75af38e095cb498791dad4044a8a9a7f5f0ee6008bb732579ab9d","complete":true,"records":3081,"lastAttemptAt":"2026-11-10T19:23:59.7538509+00:00","lastSuccessAt":"2026-11-10T14:21:34.3717399+00:00","error":null,"lastVerifiedAt":"2026-11-10T19:23:59.7538509+00:00","snapshotPublishedAt":"2026-11-10T14:18:07+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-da8f4500acb46c1f6ac483c7f26bcf8f23ffed08d67c9622553c8424a369b040","complete":true,"records":231620,"lastAttemptAt":"2026-11-10T19:23:59.4861543+00:00","lastSuccessAt":"2026-11-10T19:23:57.9397379+00:00","error":null,"lastVerifiedAt":"2026-11-10T19:23:59.4861543+00:00","snapshotPublishedAt":"2026-11-10T18:33:35+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}