GHSA-v84h-653v-4pq9: Github.com/jub0bs/fcors Some CORS Middleware Allow Untrusted Vulnerability

CRITICAL
CVSS 9.3
Published
Advisory Summary

GHSA-v84h-653v-4pq9 is a CRITICAL (CVSS 9.3) some cors middleware allow untrusted vulnerability (General Security Weakness) affecting Github.com/jub0bs/fcors libraries in the Go ecosystem. The issue involves some cors middleware allow untrusted origins. Remediation is available by upgrading affected packages to version 0.9.0.

GHSA-v84h-653v-4pq9 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-v84h-653v-4pq9
Severity CRITICAL
CVSS v3.1 Base Score 9.3
CWE Classification General Security Weakness
Affected Product Github.com/jub0bs/fcors
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.3

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:C/C:H/I:H/A:N).

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

How to Fix GHSA-v84h-653v-4pq9

To remediate this vulnerability, upgrade all affected Github.com/jub0bs/fcors 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/jub0bs/fcors fixed: 0.9.0
Upgrade github.com/jub0bs/fcors to 0.9.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/jub0bs/fcors

How to Check if You Are Affected

To determine whether your application is affected by GHSA-v84h-653v-4pq9, inspect your project dependencies for Github.com/jub0bs/fcors:

inspect dependencies for github.com/jub0bs/fcors

Analyze the terminal output to locate any version of Github.com/jub0bs/fcors in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.9.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 General Security Weakness. In Github.com/jub0bs/fcors, 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

### Impact Some CORS middleware (more specifically those created by specifying two or more origin patterns whose hosts share a proper suffix) incorrectly allow some untrusted origins, thereby opening the door to cross-origin attacks from the untrusted origins in question. For example, specifying origin patterns `https://foo.com` and `https://bar.com` (in that order) would yield a middleware that would incorrectly allow untrusted origin `https://barfoo.com`. ### Patches Patched in v0.9.0. ### Workarounds None.

GHSA-v84h-653v-4pq9 Affected Github.com/jub0bs/fcors Versions

1 component(s)
Fixed Versions:
0.9.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/jub0bs/fcors
Go
< 0.9.0
0.9.0

References

Frequently Asked Questions

What is GHSA-v84h-653v-4pq9?
GHSA-v84h-653v-4pq9 is a security vulnerability in Github.com/jub0bs/fcors involving Some CORS middleware allow untrusted origins under General Security Weakness.
Which Github.com/jub0bs/fcors versions are affected?
Affected versions include releases prior to 0.9.0 across affected packages: github.com/jub0bs/fcors.
What version fixes GHSA-v84h-653v-4pq9?
Upgrading to 0.9.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/jub0bs/fcors affected?
Yes, github.com/jub0bs/fcors is affected in releases prior to 0.9.0. Upgrade your dependency to 0.9.0 or later.
What is the CVSS score of GHSA-v84h-653v-4pq9?
GHSA-v84h-653v-4pq9 has a CVSS v3.1 base score of 9.3 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with GHSA-v84h-653v-4pq9?
GHSA-v84h-653v-4pq9 is classified under General Security Weakness.
How can I check Go dependencies for GHSA-v84h-653v-4pq9?
Run the dependency tree command: 'inspect dependencies for github.com/jub0bs/fcors'. 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-v84h-653v-4pq9",
  "modified" : "2024-05-21T15:39:20Z",
  "published" : "2024-05-03T17:34:21Z",
  "aliases" : [ ],
  "summary" : "Some CORS middleware allow untrusted origins",
  "details" : "### Impact\n\nSome CORS middleware (more specifically those created by specifying two or more origin patterns whose hosts share a proper suffix) incorrectly allow some untrusted origins, thereby opening the door to cross-origin attacks from the untrusted origins in question.\n\nFor example, specifying origin patterns `https://foo.com` and `https://bar.com` (in that order) would yield a middleware that would incorrectly allow untrusted origin `https://barfoo.com`.\n\n### Patches\n\nPatched in v0.9.0.\n\n### Workarounds\n\nNone.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/jub0bs/fcors"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.9.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.8.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jub0bs/fcors/security/advisories/GHSA-v84h-653v-4pq9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jub0bs/fcors/commit/08d85c149a418a583315cee066d4a35cc817219d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jub0bs/fcors/commit/b5dcb889a49def37d7d9c25deb7135f4eb45625e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jub0bs/fcors"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-03T17:34:21Z",
    "nvd_published_at" : null
  }
}