CVE-2023-26125 Improper input validation in github.com/gin-gonic/gin
An attacker can poison caches via the X-Forwarded-Prefix header in the Gin web framework, potentially aiding other attacks.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-26125?
CVE-2023-26125 is a medium-severity vulnerability in github.com/gin-gonic/gin, published on 4 May 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Versions of the package github.com/gin-gonic/gin before 1.9.0 are vulnerable to Improper Input Validation by allowing an attacker to use a specially crafted request via the X-Forwarded-Prefix header, potentially leading to cache poisoning. **Note:** Although this issue does not pose a significant threat on its own it can serve as an input vector for other more impactful vulnerabilities. However, successful exploitation may depend on the server configuration and whether the header is used in the application logic.
Which versions are affected by CVE-2023-26125?
2 open source packages ship an affected version, including github.com/gin-gonic/gin. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/gin-gonic/gin Go | All versions | 1.9.0 |
github.com/gin-gonic/gin Go | All versions | 1.9.0 |
Products include Gin-Gonic Gin.
How do I fix CVE-2023-26125?
Upgrade github.com/gin-gonic/gin to 1.9.0 or later.
Is CVE-2023-26125 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-26125 exists.
Other vulnerabilities in github.com/gin-gonic/gin
Sources
Also known as CLEANSTART-2026-DB86759, DEBIAN-CVE-2023-26125, GHSA-3vp4-m3rf-835h, MINI-jxjc-j22c-jfj3, UBUNTU-CVE-2023-26125.