CVE-2023-26125 — Improper input validation in github.com/gin-gonic/gin
Improper input validation in github.com/gin-gonic/gin
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.98%). Schedule for your next planned update.
Does your project use an affected github.com/gin-gonic/gin version?
Paste your go.sum to check it for CVE-2023-26125 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
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.
Advisory Timeline
- First published May 4, 2023 (1302 days ago).
- Last revised November 8, 2023 — 188 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/gin-gonic/gin@v1.9.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Go (1).
| Package | Fixed In |
|---|---|
| github.com/gin-gonic/gin Go · Affected: All versions | 1.9.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-20Improper Input ValidationMITRE
- CWE-77
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.6 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
References
- https://nvd.nist.gov/vuln/detail/CVE-2023-26125ADVISORY
- https://github.com/gin-gonic/gin/pull/3500WEB
- https://github.com/gin-gonic/gin/pull/3503WEB
- https://github.com/t0rchwo0d/gin/commit/fd9f98e70fb4107ee68c783482d231d35e60507bWEB
- https://github.com/gin-gonic/ginPACKAGE
- https://github.com/gin-gonic/gin/releases/tag/v1.9.0WEB
- https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMGINGONICGIN-3324285WEB
Frequently Asked Questions
- What is CVE-2023-26125?
- Improper input validation in github.com/gin-gonic/gin. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.6/10).
- How do I check if my project is affected by CVE-2023-26125?
- CVE-2023-26125 affects github.com/gin-gonic/gin. It has a 1.0% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2023-26125 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is an above-median EPSS score — 61% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2019-25211CRITICAL
Gin mishandles a wildcard at the end of an origin string
- CVE-2020-28483HIGH
Inconsistent Interpretation of HTTP Requests in github.com/gin-gonic/gin
- CVE-2023-29401MEDIUM
Gin Web Framework does not properly sanitize filename parameter of Context.FileAttachment function
- CVE-2026-54765MEDIUM
Traefik: Gateway HTTPRoute backendRef filters can leak backend context across routes sharing a Service:port
- CVE-2026-88011MEDIUM
Traefik: ForwardAuth identity spoofing via dot-form header alias
- CVE-2020-28483
Inconsistent interpretation of HTTP Requests in github.com/gin-gonic/gin
- CVE-2023-29401
Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin