Vulnerabilities in pkg:golang/gopkg.in/macaron.v1

PACKAGE
Advisory Identifier: GHSA-733f-44f3-3frw
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/gopkg.in/macaron.v1

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/gopkg.in/macaron.v1. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-733f-44f3-3frw CVE-2020-12666 MODERATE gopkg.in/macaron.v1 Open Redirect vulnerability

CVE-2020-12666 at a Glance

CVE Identifier CVE-2020-12666
GHSA Identifier GHSA-733f-44f3-3frw
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Gopkg.in/macaron.v1
Package Ecosystem Go
Published Date
Last Updated

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).

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 Low (C:L)
Integrity Low (I:L)
Availability None (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.

gopkg.in/macaron.v1 fixed: 1.3.7
Upgrade gopkg.in/macaron.v1 to 1.3.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 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

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.

CVE-2020-12666 Affected Gopkg.in/macaron.v1 Versions

1 component(s)
Fixed Versions:
1.3.7
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?
CVE-2020-12666 is a security vulnerability in Gopkg.in/macaron.v1 involving gopkg.in/macaron.v1 Open Redirect vulnerability under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Gopkg.in/macaron.v1 versions are affected?
Affected versions include releases prior to 1.3.7 across affected packages: gopkg.in/macaron.v1.
What version fixes CVE-2020-12666?
Upgrading to 1.3.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gopkg.in/macaron.v1 affected?
Yes, gopkg.in/macaron.v1 is affected in releases prior to 1.3.7. Upgrade your dependency to 1.3.7 or later.
What is the CVSS score of CVE-2020-12666?
CVE-2020-12666 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2020-12666?
CVE-2020-12666 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check Go dependencies for CVE-2020-12666?
Run the dependency tree command: 'inspect dependencies for gopkg.in/macaron.v1'. 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-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"
  }
}