VDB

SNYK-GOLANG-GITHUBCOMGINGONICGIN-3324285

SNYK-GOLANG-GITHUBCOMGINGONICGIN-3324285 PUBLISHED CVSS 5.599999904632568 MEDIUM

## Overview [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) is a package that implements a HTTP web framework called gin. Affected versions of this package 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. ## PoC ``` package main import ( "net/http" "github.com/gin-gonic/gin" ) func main() { r := gin.Default() r.GET("/bug", func(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"msg": "bug"}) }) r.Run() } ``` ## Remediation Upgrade `github.com/gin-gonic/gin` to version 1.9.0 or higher. ## References - [GitHub Commit](https://github.com/t0rchwo0d/gin/commit/fd9f98e70fb4107ee68c783482d231d35e60507b) - [GitHub PR](https://github.com/gin-gonic/gin/pull/3500) - [GitHub PR](https://github.com/gin-gonic/gin/pull/3503) - [GitHub Release](https://github.com/gin-gonic/gin/releases/tag/v1.9.0)

Risk Scores

CVSS 3.1
5.599999904632568
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L

Affected Products

VendorProductVersions
0

Timeline

  • Feb 17, 2023 CVE Updated
  • May 3, 2023 CVE Published
Open in Interactive Console →
$ Console Community · 100/wk Open console ›