Improper Input Validation Affecting github.com/gin-gonic/gin package, versions <1.9.1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.12% (48th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-GOLANG-GITHUBCOMGINGONICGIN-5406508
  • published 12 May 2023
  • disclosed 4 Apr 2023
  • credit motoyasu-saburi

How to fix?

Upgrade github.com/gin-gonic/gin to version 1.9.1 or higher.

Overview

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 via the FileAttachment function, due to improper handling of the filename in the Content-Disposition response header.

Exploiting this vulnerability allows the extension/file name to be tampered with when downloading files.

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
7.5 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    Required
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    High
Expand this section

NVD

4.3 medium