Go Vulnerability Database
GO-2021-0052
Inconsistent interpretation of HTTP Requests in github.com/gin-gonic/gin
Details
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.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Go | github.com/gin-gonic/gin | All versions before 1.7.7 (fixed in 1.7.7) |
References
- https://github.com/gin-gonic/gin/issues/2862
- https://github.com/gin-gonic/gin/issues/2473
- https://github.com/gin-gonic/gin/issues/2232
- https://github.com/gin-gonic/gin/pull/2844
- https://github.com/gin-gonic/gin/commit/5929d521715610c9dd14898ebbe1d188d5de8937
- https://github.com/gin-gonic/gin/pull/2632
- https://github.com/gin-gonic/gin/commit/bfc8ca285eb46dad60e037d57c545cd260636711
- https://github.com/gin-gonic/gin/pull/2675
- https://github.com/gin-gonic/gin/commit/03e5e05ae089bc989f1ca41841f05504d29e3fd9
- https://github.com/gin-gonic/gin/pull/2474