CVE-2020-12283: Github.com/sourcegraph/sourcegraph Remote Code Execution Vulnerability
MODERATECVE-2020-12283 is a MODERATE (CVSS 6.1) remote code execution vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Github.com/sourcegraph/sourcegraph libraries in the Go ecosystem. The issue involves open redirect vulnerability in sourcegraph. Remediation is available by upgrading affected packages to version 3.14.4, 3.15.1.
CVE-2020-12283 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-12283
To remediate this vulnerability, upgrade all affected Github.com/sourcegraph/sourcegraph 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/sourcegraph/sourcegraph to 3.14.4
Upgrade github.com/sourcegraph/sourcegraph to 3.15.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/sourcegraph/sourcegraph
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-12283, inspect your project dependencies for Github.com/sourcegraph/sourcegraph:
inspect dependencies for github.com/sourcegraph/sourcegraph
Analyze the terminal output to locate any version of Github.com/sourcegraph/sourcegraph in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.14.4), 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 Github.com/sourcegraph/sourcegraph, 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-12283 Affected Github.com/sourcegraph/sourcegraph Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/sourcegraph/sourcegraph
|
Go |
< 3.14.4
|
3.14.4
|
|
github.com/sourcegraph/sourcegraph
|
Go |
≥ 3.15.0
< 3.15.1
|
3.15.1
|
References
Frequently Asked Questions
What is CVE-2020-12283?
Which Github.com/sourcegraph/sourcegraph versions are affected?
What version fixes CVE-2020-12283?
Is github.com/sourcegraph/sourcegraph affected?
What is the CVSS score of CVE-2020-12283?
What CWE is associated with CVE-2020-12283?
How can I check Go dependencies for CVE-2020-12283?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mx43-r985-5h4m",
"modified" : "2023-10-02T14:32:06Z",
"published" : "2021-12-20T18:12:47Z",
"aliases" : [ "CVE-2020-12283" ],
"summary" : "Open redirect vulnerability in Sourcegraph",
"details" : "### Impact\n\nAn open redirect vulnerability that allows users to be targeted for phishing attacks has been found in Sourcegraph instances configured with OAuth, OpenID, or SAML authentication enabled. Users targeted by these phishing attacks could have their authentication tokens silently harvested by an attacker.\n\n### Specific Go Packages Affected\ngithub.com/sourcegraph/sourcegraph/cmd/frontend/auth\n\n### Resolution\n\nSourcegraph v3.14.4 and v3.15.1 have been released which resolve the vulnerability. ([associated change](https://github.com/sourcegraph/sourcegraph/pull/10167))\n\n### Workarounds\n\nDisabling OAuth, OpenID and/or SAML sign-in options until upgraded to the patched versions will secure Sourcegraph / workaround the issue.\n\n### Timeline\n\n- Apr 23, 8 AM PST: GitHub Security Lab reported the issue to Sourcegraph.\n- Apr 23, 11 PM PST: A Sourcegraph engineer proposed a resolution for the vulnerability. https://github.com/sourcegraph/sourcegraph/pull/10167\n- Apr 24, 3 AM PST: The proposed resolution was reviewed, approved, and merged.\n- Apr 28, 2 PM PST: Patch releases for 3.14.4 and 3.15.1 were published.\n- Apr 29, 10 PM PST: Mitre publicly disclosed [CVE-2020-12283](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-12283).\n- Apr 30, 11 AM PST: Sourcegraph issued a GitHub security advisory and notified all affected users.\n\n### References\n\n- [Mitre: CVE-2020-12283](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-12283)\n- [GitHub Security Lab: GHSL-2020-085](https://securitylab.github.com/advisories/GHSL-2020-085-sourcegraph)\n- [detectify's blog post on open redirect vulnerabilities\n](https://blog.detectify.com/2019/05/16/the-real-impact-of-an-open-redirect/)\n\n### For more information\n\nIf you have any questions or comments about this advisory, please contact us at [support@sourcegraph.com](mailto:support@sourcegraph.com) and include `CVE-2020-12283` in the title.",
"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" : "github.com/sourcegraph/sourcegraph"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.14.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/sourcegraph/sourcegraph"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.15.0"
}, {
"fixed" : "3.15.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-mx43-r985-5h4m"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-12283"
}, {
"type" : "WEB",
"url" : "https://github.com/sourcegraph/sourcegraph/pull/10167"
}, {
"type" : "WEB",
"url" : "https://github.com/sourcegraph/sourcegraph/commit/c0f48172e815c7f66471a38f0a06d1fc32a77a64"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sourcegraph/sourcegraph"
}, {
"type" : "WEB",
"url" : "https://github.com/sourcegraph/sourcegraph/blob/master/CHANGELOG.md"
}, {
"type" : "WEB",
"url" : "https://github.com/sourcegraph/sourcegraph/compare/v3.15.0...v3.15.1"
}, {
"type" : "ADVISORY",
"url" : "https://securitylab.github.com/advisories/GHSL-2020-085-sourcegraph"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-24T21:06:22Z",
"nvd_published_at" : null
}
}