CVE-2023-26125 Improper input validation in github.com/gin-gonic/gin

Medium 5.6 Published Updated

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.

Weakness: CWE-77, CWE-20

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.

PackageAffectedFixed in
github.com/gin-gonic/gin GoAll versions1.9.0
github.com/gin-gonic/gin GoAll versions1.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.

Sources

Also known as CLEANSTART-2026-DB86759, DEBIAN-CVE-2023-26125, GHSA-3vp4-m3rf-835h, MINI-jxjc-j22c-jfj3, UBUNTU-CVE-2023-26125.

Is CVE-2023-26125 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free