Vulnerabilities in pkg:golang/github.com/jub0bs/cors
PACKAGEGHSA-vhxv-fg4m-p2w8 is a CRITICAL (CVSS 9.3) some cors middleware allow untrusted vulnerability (General Security Weakness) affecting Github.com/jub0bs/cors libraries in the Go ecosystem. The issue involves some cors middleware allow untrusted origins. Remediation is available by upgrading affected packages to version 0.1.3.
pkg:golang/github.com/jub0bs/cors
Vulnerability advisories affecting package pkg:golang/github.com/jub0bs/cors. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-vhxv-fg4m-p2w8 | - | CRITICAL | Some CORS middleware allow untrusted origins |
GHSA-vhxv-fg4m-p2w8 at a Glance
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).
How to Fix GHSA-vhxv-fg4m-p2w8
To remediate this vulnerability, upgrade all affected Github.com/jub0bs/cors dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/jub0bs/cors to 0.1.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/jub0bs/cors
How to Check if You Are Affected
To determine whether your application is affected by GHSA-vhxv-fg4m-p2w8, inspect your project dependencies for Github.com/jub0bs/cors:
inspect dependencies for github.com/jub0bs/cors
Analyze the terminal output to locate any version of Github.com/jub0bs/cors in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.3), 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/cors, 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
GHSA-vhxv-fg4m-p2w8 Affected Github.com/jub0bs/cors Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/jub0bs/cors
|
Go |
< 0.1.3
|
0.1.3
|
References
Frequently Asked Questions
What is GHSA-vhxv-fg4m-p2w8?
Which Github.com/jub0bs/cors versions are affected?
What version fixes GHSA-vhxv-fg4m-p2w8?
Is github.com/jub0bs/cors affected?
What is the CVSS score of GHSA-vhxv-fg4m-p2w8?
What CWE is associated with GHSA-vhxv-fg4m-p2w8?
How can I check Go dependencies for GHSA-vhxv-fg4m-p2w8?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vhxv-fg4m-p2w8",
"modified" : "2024-05-21T15:38:55Z",
"published" : "2024-05-03T17:34:17Z",
"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.1.3.\n\n### Workarounds\n\nNone.",
"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/cors"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jub0bs/cors/security/advisories/GHSA-vhxv-fg4m-p2w8"
}, {
"type" : "WEB",
"url" : "https://github.com/jub0bs/cors/commit/5bc0648a32db2d600179a50866f648f4d7090363"
}, {
"type" : "WEB",
"url" : "https://github.com/jub0bs/cors/commit/63900fa1776237095fa0ed47ff85791e21f3a7d7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jub0bs/cors"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-03T17:34:17Z",
"nvd_published_at" : null
}
}