CVE-2020-28483: Github.com/gin gonic/gin Inconsistent Interpretation Of HTTP Requests Vulnerability

HIGH
Advisory Identifier: GHSA-h395-qcrw-5vmq
CVSS 7.1
CWE-113 CWE-444
Published
Advisory Summary

CVE-2020-28483 is a HIGH (CVSS 7.1) inconsistent interpretation of http requests vulnerability (CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')) affecting Github.com/gin gonic/gin libraries in the Go ecosystem. The issue involves inconsistent interpretation of http requests in github.com/gin-gonic/gin. Remediation is available by upgrading affected packages to version 1.7.7.

CVE-2020-28483 at a Glance

CVE Identifier CVE-2020-28483
GHSA Identifier GHSA-h395-qcrw-5vmq
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')
Affected Product Github.com/gin gonic/gin
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2020-28483

To remediate this vulnerability, upgrade all affected Github.com/gin gonic/gin dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/gin-gonic/gin fixed: 1.7.7
Upgrade github.com/gin-gonic/gin to 1.7.7
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/gin-gonic/gin

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-28483, inspect your project dependencies for Github.com/gin gonic/gin:

inspect dependencies for github.com/gin-gonic/gin

Analyze the terminal output to locate any version of Github.com/gin gonic/gin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.7.7), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting'), where the product receives data from an http agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes cr and lf characters before the data is included in outgoing http headers. In Github.com/gin gonic/gin, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

When gin is exposed directly to the internet, a client's IP can be spoofed by setting the X-Forwarded-For header. This affects all versions of package github.com/gin-gonic/gin under 1.7.7.

CVE-2020-28483 Affected Github.com/gin gonic/gin Versions

1 component(s)
Fixed Versions:
1.7.7
Product / Package Ecosystem Affected Versions Fixed Version
github.com/gin-gonic/gin
Go
< 1.7.7
1.7.7

References

NVD — CVE-2020-28483 NVD
https://nvd.nist.gov/vuln/detail/CVE-2020-28483
Github.com/gin gonic/gin Source Repository REPOSITORY
https://github.com/gin-gonic/gin/issues/2232
Github.com/gin gonic/gin Source Repository REPOSITORY
https://github.com/gin-gonic/gin/issues/2473
Github.com/gin gonic/gin Source Repository REPOSITORY
https://github.com/gin-gonic/gin/issues/2862
Github.com/gin gonic/gin Source Repository REPOSITORY
https://github.com/gin-gonic/gin/pull/2474
Github.com/gin gonic/gin Source Repository REPOSITORY
https://github.com/gin-gonic/gin/pull/2474#23issuecomment-729696437
Github.com/gin gonic/gin Source Repository REPOSITORY
https://github.com/gin-gonic/gin/pull/2632
Github.com/gin gonic/gin Source Repository REPOSITORY
https://github.com/gin-gonic/gin/pull/2675
Github.com/gin gonic/gin Source Repository REPOSITORY
https://github.com/gin-gonic/gin/pull/2844
Github.com/gin gonic/gin Source Repository REPOSITORY
https://github.com/gin-gonic/gin/pull/2844/files#diff-e6ce689a25eaef174c2dd51fe869fabbe04a6c6afbd416b23eda138c82e761baR1432
Security Fix Commit FIX COMMIT
https://github.com/gin-gonic/gin/commit/03e5e05ae089bc989f1ca41841f05504d29e3fd9
Security Fix Commit FIX COMMIT
https://github.com/gin-gonic/gin/commit/5929d521715610c9dd14898ebbe1d188d5de8937
Security Fix Commit FIX COMMIT
https://github.com/gin-gonic/gin/commit/bfc8ca285eb46dad60e037d57c545cd260636711
snyk.io/vuln/snyk-golang-gi... WEB
https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMGINGONICGIN-1041736
pkg.go.dev/vuln/go-2021-0052 WEB
https://pkg.go.dev/vuln/GO-2021-0052
Github.com/gin gonic/gin Release RELEASE
https://github.com/gin-gonic/gin/releases/tag/v1.7.7
Github.com/gin gonic/gin Release RELEASE
https://github.com/gin-gonic/gin/releases/tag/v1.7.0
Github.com/gin gonic/gin Source Repository REPOSITORY
https://github.com/gin-gonic/gin

Frequently Asked Questions

What is CVE-2020-28483?
CVE-2020-28483 is a security vulnerability in Github.com/gin gonic/gin involving Inconsistent Interpretation of HTTP Requests in github.com/gin-gonic/gin under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting').
Which Github.com/gin gonic/gin versions are affected?
Affected versions include releases prior to 1.7.7 across affected packages: github.com/gin-gonic/gin.
What version fixes CVE-2020-28483?
Upgrading to 1.7.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/gin-gonic/gin affected?
Yes, github.com/gin-gonic/gin is affected in releases prior to 1.7.7. Upgrade your dependency to 1.7.7 or later.
What is the CVSS score of CVE-2020-28483?
CVE-2020-28483 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N.
What CWE is associated with CVE-2020-28483?
CVE-2020-28483 is classified under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') (The product receives data from an HTTP agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes CR and LF characters before the data is included in outgoing HTTP headers.).
How can I check Go dependencies for CVE-2020-28483?
Run the dependency tree command: 'inspect dependencies for github.com/gin-gonic/gin'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-h395-qcrw-5vmq",
  "modified" : "2024-05-20T19:29:07Z",
  "published" : "2021-06-23T17:53:21Z",
  "aliases" : [ "CVE-2020-28483" ],
  "summary" : "Inconsistent Interpretation of HTTP Requests in github.com/gin-gonic/gin",
  "details" : "When gin is exposed directly to the internet, a client's IP can be spoofed by setting the X-Forwarded-For header. This affects all versions of package github.com/gin-gonic/gin under 1.7.7. ",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/gin-gonic/gin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.7.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-28483"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gin-gonic/gin/issues/2232"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gin-gonic/gin/issues/2473"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gin-gonic/gin/issues/2862"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gin-gonic/gin/pull/2474"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gin-gonic/gin/pull/2474#23issuecomment-729696437"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gin-gonic/gin/pull/2632"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gin-gonic/gin/pull/2675"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gin-gonic/gin/pull/2844"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gin-gonic/gin/pull/2844/files#diff-e6ce689a25eaef174c2dd51fe869fabbe04a6c6afbd416b23eda138c82e761baR1432"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gin-gonic/gin/commit/03e5e05ae089bc989f1ca41841f05504d29e3fd9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gin-gonic/gin/commit/5929d521715610c9dd14898ebbe1d188d5de8937"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gin-gonic/gin/commit/bfc8ca285eb46dad60e037d57c545cd260636711"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMGINGONICGIN-1041736"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2021-0052"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gin-gonic/gin/releases/tag/v1.7.7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gin-gonic/gin/releases/tag/v1.7.0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/gin-gonic/gin"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-113", "CWE-444" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-12T21:46:50Z",
    "nvd_published_at" : "2021-01-20T18:15:00Z"
  }
}