NetSight
medium4.8No CVE yet

GHSA-7cgw-qmxx-7fc2

Duplicate Advisory: chi: Client IP spoofing in ClientIPFromXFF via X-Forwarded-For

Impact

## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-j6qf-3m9c-vwj3. This link is maintained to preserve external references. ## Original Description In the Golang Chi web framework, the ClientIPFromXFF middleware skips any X-Forwarded-For entry in a configured trusted CIDR but never verifies that the direct TCP peer in http.Request.RemoteAddr belongs to that CIDR. A client that can reach the Go server directly can therefore append a trusted-looking proxy address and choose the client IP returned by middleware.GetClientIP. This issue affects chi before 5.4.0.

An attacker can exploit this over the network, without logging in, without any action by a user. Specific conditions have to be met, which makes an attack harder. If it succeeds: low risk of data being read, low risk of data or systems being changed.

Affected packages

EcosystemPackageAffectedFixed in
gogithub.com/go-chi/chi/v5<= 5.3.2none recorded

Weakness classification

References