Skip to main content

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

MEDIUM

Improper input validation in github.com/gin-gonic/gin

Published May 4, 2023Updated November 8, 2023Source: OSV

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.

Check my go.sum

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
Update github.com/gin-gonic/gin to 1.9.0 or later
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).

PackageFixed In
github.com/gin-gonic/gin Go · Affected: All versions1.9.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 5.6 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

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

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

CVSS Score
5.6

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
0.98%
EPSS percentile: 61

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

GHSA-3vp4-m3rf-835h

Related CVEs

  • CVE-2019-25211
    CRITICAL

    Gin mishandles a wildcard at the end of an origin string

  • CVE-2020-28483
    HIGH

    Inconsistent Interpretation of HTTP Requests in github.com/gin-gonic/gin

  • CVE-2023-29401
    MEDIUM

    Gin Web Framework does not properly sanitize filename parameter of Context.FileAttachment function

  • CVE-2026-54765
    MEDIUM

    Traefik: Gateway HTTPRoute backendRef filters can leak backend context across routes sharing a Service:port

  • CVE-2026-88011
    MEDIUM

    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

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my go.sum