CVE-2020-12666: Gopkg.in/macaron.v1 Gopkg.in/macaron.v1 Open Redirect Vulnerability Vulnerability
MODERATECVE-2020-12666 is a MODERATE (CVSS 6.1) gopkg.in/macaron.v1 open redirect vulnerability vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Gopkg.in/macaron.v1 libraries in the Go ecosystem. The issue involves gopkg.in/macaron.v1 open redirect vulnerability. Remediation is available by upgrading affected packages to version 1.3.7.
CVE-2020-12666 at a Glance
Security Impact
CVSS: 6.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:C/C:L/I:L/A:N).
How to Fix CVE-2020-12666
To remediate this vulnerability, upgrade all affected Gopkg.in/macaron.v1 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 gopkg.in/macaron.v1 to 1.3.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for gopkg.in/macaron.v1
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-12666, inspect your project dependencies for Gopkg.in/macaron.v1:
inspect dependencies for gopkg.in/macaron.v1
Analyze the terminal output to locate any version of Gopkg.in/macaron.v1 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.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-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Gopkg.in/macaron.v1, 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
CVE-2020-12666 Affected Gopkg.in/macaron.v1 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
gopkg.in/macaron.v1
|
Go |
< 1.3.7
|
1.3.7
|
References
Frequently Asked Questions
What is CVE-2020-12666?
Which Gopkg.in/macaron.v1 versions are affected?
What version fixes CVE-2020-12666?
Is gopkg.in/macaron.v1 affected?
What is the CVSS score of CVE-2020-12666?
What CWE is associated with CVE-2020-12666?
How can I check Go dependencies for CVE-2020-12666?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-733f-44f3-3frw",
"modified" : "2024-05-20T19:24:04Z",
"published" : "2021-05-18T21:08:35Z",
"aliases" : [ "CVE-2020-12666" ],
"summary" : "gopkg.in/macaron.v1 Open Redirect vulnerability",
"details" : "macaron before 1.3.7 has an open redirect in the static handler. Due to improper request santization, a specifically crafted URL can cause the static file handler to redirect to an attacker chosen URL, allowing for open redirect attacks.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "gopkg.in/macaron.v1"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.7"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-12666"
}, {
"type" : "WEB",
"url" : "https://github.com/go-macaron/macaron/issues/198"
}, {
"type" : "WEB",
"url" : "https://github.com/go-macaron/macaron/issues/198#issuecomment-622885959"
}, {
"type" : "WEB",
"url" : "https://github.com/go-macaron/macaron/pull/199"
}, {
"type" : "WEB",
"url" : "https://github.com/go-macaron/macaron/pull/199/commits/6bd9385542f7133467ab7d09a5f28f7d5dc52af7"
}, {
"type" : "WEB",
"url" : "https://github.com/go-macaron/macaron/commit/addc7461c3a90a040e79aa75bfd245107a210245"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/go-macaron/macaron"
}, {
"type" : "WEB",
"url" : "https://github.com/go-macaron/macaron/releases/tag/v1.3.7"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3QEUOHRC4EN4WZ66EVFML2UCV7ZQ63XZ"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2020-0039"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-18T20:50:16Z",
"nvd_published_at" : "2020-05-05T22:15:00Z"
}
}