CVE-2023-26125: Github.com/gin gonic/gin Improper Input Validation Vulnerability
MODERATECVE-2023-26125 is a MODERATE (CVSS 5.6) improper input validation vulnerability (CWE-20: Improper Input Validation) affecting Github.com/gin gonic/gin libraries in the Go ecosystem. The issue involves improper input validation in github.com/gin-gonic/gin. Remediation is available by upgrading affected packages to version 1.9.0.
CVE-2023-26125 at a Glance
Security Impact
CVSS: 5.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2023-26125
To remediate this vulnerability, upgrade all affected Github.com/gin gonic/gin dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/gin-gonic/gin to 1.9.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/gin-gonic/gin
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-26125, inspect your project dependencies for Github.com/gin gonic/gin:
inspect dependencies for github.com/gin-gonic/gin
Analyze the terminal output to locate any version of Github.com/gin gonic/gin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Github.com/gin gonic/gin, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-26125 Affected Github.com/gin gonic/gin Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/gin-gonic/gin
|
Go |
< 1.9.0
|
1.9.0
|
References
Frequently Asked Questions
What is CVE-2023-26125?
Which Github.com/gin gonic/gin versions are affected?
What version fixes CVE-2023-26125?
Is github.com/gin-gonic/gin affected?
What is the CVSS score of CVE-2023-26125?
What CWE is associated with CVE-2023-26125?
How can I check Go dependencies for CVE-2023-26125?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3vp4-m3rf-835h",
"modified" : "2023-05-11T14:03:52Z",
"published" : "2023-05-04T06:30:12Z",
"aliases" : [ "CVE-2023-26125" ],
"summary" : "Improper input validation in github.com/gin-gonic/gin",
"details" : "Versions of the package github.com/gin-gonic/gin before version 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.\n\n**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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/gin-gonic/gin"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.9.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-26125"
}, {
"type" : "WEB",
"url" : "https://github.com/gin-gonic/gin/pull/3500"
}, {
"type" : "WEB",
"url" : "https://github.com/gin-gonic/gin/pull/3503"
}, {
"type" : "WEB",
"url" : "https://github.com/t0rchwo0d/gin/commit/fd9f98e70fb4107ee68c783482d231d35e60507b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gin-gonic/gin"
}, {
"type" : "WEB",
"url" : "https://github.com/gin-gonic/gin/releases/tag/v1.9.0"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMGINGONICGIN-3324285"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-77" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-05-05T02:20:00Z",
"nvd_published_at" : "2023-05-04T05:15:09Z"
}
}