LowGO-2021-0052CVE-2020-28483GHSA-h395-qcrw-5vmqSNYK-GOLANG-GITHUBCOMGINGONICGIN-1041736
Inconsistent interpretation of HTTP Requests in github.com/gin-gonic/gin
Published 14 Apr 2021 · Updated 8 Jul 2026
Is your project on an affected github.com/gin-gonic/gin?
Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <1.7.7
- Fixed in
- 1.7.7
Update to the fixed version for your release line, for example:
go get github.com/gin-gonic/gin@v1.7.7Details
Due to improper HTTP header sanitization, a malicious user can spoof their source IP address by setting the X-Forwarded-For header. This may allow a user to bypass IP based restrictions, or obfuscate their true source.
Is GO-2021-0052 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/gin-gonic/gin, and gives you the command that fixes it.
More advisories for github.com/gin-gonic/gin
- CriticalCVE-2019-25211Gin mishandles a wildcard at the end of an origin string · 29 Jun 2024
- MediumCVE-2023-29401Gin Web Framework does not properly sanitize filename parameter of Context.FileAttachment function · 12 May 2023
- LowCVE-2023-29401Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin · 11 May 2023
- MediumCVE-2023-26125Improper input validation in github.com/gin-gonic/gin · 4 May 2023
- HighCVE-2020-36567Gin's default logger allows unsanitized input that can allow remote attackers to inject arbitrary log lines · 27 Dec 2022
- LowCVE-2020-36567Arbitrary log line injection in github.com/gin-gonic/gin · 14 Apr 2021
References
- Reportgithub.com/gin-gonic/gin/issues/2862
- Reportgithub.com/gin-gonic/gin/issues/2473
- Reportgithub.com/gin-gonic/gin/issues/2232
- Fixgithub.com/gin-gonic/gin/pull/2844
- Fixgithub.com/gin-gonic/gin/commit/5929d521715610c9dd14898ebbe1d188d5de8937
- Fixgithub.com/gin-gonic/gin/pull/2632
- Fixgithub.com/gin-gonic/gin/commit/bfc8ca285eb46dad60e037d57c545cd260636711
- Fixgithub.com/gin-gonic/gin/pull/2675
- Fixgithub.com/gin-gonic/gin/commit/03e5e05ae089bc989f1ca41841f05504d29e3fd9
- Linkgithub.com/gin-gonic/gin/pull/2474
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.