CVE-2020-12283 is a medium-severity (CVSS 6.1) Open Redirect vulnerability in github.com/sourcegraph/sourcegraph. 1 public exploit reference exists, so weaponization risk is real. A fix is available for github.com/sourcegraph/sourcegraph — see the affected versions and patch details below.
Open redirect vulnerability in Sourcegraph
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2020-12283 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,386 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
github.com/sourcegraph/sourcegraph🐹github.com/sourcegraph/sourcegraphReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Impact
An 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.
Specific Go Packages Affected
github.com/sourcegraph/sourcegraph/cmd/frontend/auth
Resolution
Sourcegraph v3.14.4 and v3.15.1 have been released which resolve the vulnerability. (associated change)
Workarounds
Disabling OAuth, OpenID and/or SAML sign-in options until upgraded to the patched versions will secure Sourcegraph / workaround the issue.
Timeline
- Apr 23, 8 AM PST: GitHub Security Lab reported the issue to Sourcegraph.
- Apr 23, 11 PM PST: A Sourcegraph engineer proposed a resolution for the vulnerability. https://github.com/sourcegraph/sourcegraph/pull/10167
- Apr 24, 3 AM PST: The proposed resolution was reviewed, approved, and merged.
- Apr 28, 2 PM PST: Patch releases for 3.14.4 and 3.15.1 were published.
- Apr 29, 10 PM PST: Mitre publicly disclosed CVE-2020-12283.
- Apr 30, 11 AM PST: Sourcegraph issued a GitHub security advisory and notified all affected users.
References
- Mitre: CVE-2020-12283
- GitHub Security Lab: GHSL-2020-085
- detectify's blog post on open redirect vulnerabilities
For more information
If you have any questions or comments about this advisory, please contact us at [email protected] and include CVE-2020-12283 in the title.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/sourcegraph/sourcegraph | all versions | 3.14.4go get github.com/sourcegraph/sourcegraph@v3.14.4 |
| 🐹Go | github.com/sourcegraph/sourcegraph | ≥ 3.15.0&&< 3.15.1 | 3.15.1go get github.com/sourcegraph/sourcegraph@v3.15.1 |
Affected Products
sourcegraphsourcegraphResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/sourcegraph/sourcegraph, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/sourcegraph/sourcegraph to 3.14.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-12283 is resolved across your whole dependency graph.
Workarounds
Stop reflecting attacker-controlled destinations: resolve every redirect target against an allowlist of paths or hosts you own, prefer a server-side key over a full URL in the request, and reject absolute URLs entirely where the flow only ever needs a relative one.
Frequently Asked Questions
Is CVE-2020-12283 in your dependencies?
Find it across Go, including transitive dependencies.