GitHub Advisoryadvisory · Go
GHSA-mx43-r985-5h4m Open redirect vulnerability in Sourcegraph
MEDIUM
Official page ↗
- Aliases
- CVE-2020-12283
- Ecosystem
- Go
- Packages
- github.com/sourcegraph/sourcegraph
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Weaknesses
- CWE-601
- Reviewed
- 2021-05-24
Affected packages
• Go github.com/sourcegraph/sourcegraph: < 3.14.4 → fixed in 3.14.4
• Go github.com/sourcegraph/sourcegraph: >= 3.15.0, < 3.15.1 → fixed in 3.15.1
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.
Related
Alias · CVE (1)
- CVE-2020-12283 Sourcegraph before 3.15.1 has a vulnerable authentication workflow because of improper validation in the SafeRedirectURL method in… vulnerability
Weakness · CWE (1)
- CWE-601 URL Redirection to Untrusted Site weakness
References
- https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-mx43-r985-5h4m web
- https://nvd.nist.gov/vuln/detail/CVE-2020-12283 advisory
- https://github.com/sourcegraph/sourcegraph/pull/10167 web
- https://github.com/sourcegraph/sourcegraph/commit/c0f48172e815c7f66471a38f0a06d1fc32a77a64 web
- https://github.com/sourcegraph/sourcegraph package
- https://github.com/sourcegraph/sourcegraph/blob/master/CHANGELOG.md web
- https://github.com/sourcegraph/sourcegraph/compare/v3.15.0...v3.15.1 web
- https://securitylab.github.com/advisories/GHSL-2020-085-sourcegraph advisory