CVE-2018-20744: Github.com/gofiber/fiber/v2 Github.com/gofiber/fiber/v2 Vulnerable To Origin Validation Vulnerability

MODERATE
Advisory Identifier: GHSA-927h-x4qj-r242
CVSS 5.9
CWE-346
Published
Advisory Summary

CVE-2018-20744 is a MODERATE (CVSS 5.9) github.com/gofiber/fiber/v2 vulnerable to origin validation vulnerability (CWE-346: Origin Validation Error) affecting Github.com/gofiber/fiber/v2 libraries in the Go ecosystem. The issue involves github.com/gofiber/fiber/v2 vulnerable to origin validation error. Remediation is available by upgrading affected packages to version 2.43.0, 1.5.0.

CVE-2018-20744 at a Glance

CVE Identifier CVE-2018-20744
GHSA Identifier GHSA-927h-x4qj-r242
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-346: Origin Validation Error
Affected Product Github.com/gofiber/fiber/v2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.9

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

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

How to Fix CVE-2018-20744

To remediate this vulnerability, upgrade all affected Github.com/gofiber/fiber/v2 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/gofiber/fiber/v2 fixed: 2.43.0
Upgrade github.com/gofiber/fiber/v2 to 2.43.0
github.com/rs/cors fixed: 1.5.0
Upgrade github.com/rs/cors to 1.5.0
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/gofiber/fiber/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2018-20744, inspect your project dependencies for Github.com/gofiber/fiber/v2:

inspect dependencies for github.com/gofiber/fiber/v2

Analyze the terminal output to locate any version of Github.com/gofiber/fiber/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.43.0), 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-346: Origin Validation Error, where the product does not properly verify that the source of data or communication is valid. In Github.com/gofiber/fiber/v2, 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

The Olivier Poitrey Go CORS handler through 1.3.0 actively converts a wildcard CORS policy into reflecting an arbitrary Origin header value, which is incompatible with the CORS security design, and could lead to CORS misconfiguration security problems.

CVE-2018-20744 Affected Github.com/gofiber/fiber/v2 Versions

2 component(s)
Fixed Versions:
2.43.01.5.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/gofiber/fiber/v2
Go
≥ 2.0.0
< 2.43.0
2.43.0
github.com/rs/cors
Go
< 1.5.0
1.5.0

References

Frequently Asked Questions

What is CVE-2018-20744?
CVE-2018-20744 is a security vulnerability in Github.com/gofiber/fiber/v2 involving github.com/gofiber/fiber/v2 vulnerable to Origin Validation Error under CWE-346: Origin Validation Error.
Which Github.com/gofiber/fiber/v2 versions are affected?
Affected versions include releases prior to 2.43.0, 1.5.0 across affected packages: github.com/gofiber/fiber/v2, github.com/rs/cors.
What version fixes CVE-2018-20744?
Upgrading to 2.43.0, 1.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/gofiber/fiber/v2 affected?
Yes, github.com/gofiber/fiber/v2 is affected in releases prior to 2.43.0. Upgrade your dependency to 2.43.0 or later.
Is github.com/rs/cors affected?
Yes, github.com/rs/cors is affected in releases prior to 1.5.0. Upgrade your dependency to 1.5.0 or later.
What is the CVSS score of CVE-2018-20744?
CVE-2018-20744 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2018-20744?
CVE-2018-20744 is classified under CWE-346: Origin Validation Error (The product does not properly verify that the source of data or communication is valid.).
How can I check Go dependencies for CVE-2018-20744?
Run the dependency tree command: 'inspect dependencies for github.com/gofiber/fiber/v2'. 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-927h-x4qj-r242",
  "modified" : "2024-05-20T21:53:21Z",
  "published" : "2022-05-14T01:33:06Z",
  "aliases" : [ "CVE-2018-20744" ],
  "summary" : "github.com/gofiber/fiber/v2 vulnerable to Origin Validation Error",
  "details" : "The Olivier Poitrey Go CORS handler through 1.3.0 actively converts a wildcard CORS policy into reflecting an arbitrary Origin header value, which is incompatible with the CORS security design, and could lead to CORS misconfiguration security problems.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/gofiber/fiber/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.43.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/rs/cors"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.5.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-20744"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gofiber/fiber/issues/2338"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rs/cors/issues/55"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gofiber/fiber/pull/2339"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rs/cors/pull/57"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/gofiber/fiber"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200227091122/http://www.securityfocus.com/bid/106834"
  }, {
    "type" : "WEB",
    "url" : "https://www.usenix.org/system/files/conference/usenixsecurity18/sec18-chen.pdf"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-346" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-14T14:53:20Z",
    "nvd_published_at" : "2019-01-28T08:29:00Z"
  }
}