Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect')GHSA-wcx9-ccpj-hx3c
MEDIUMFix: coder/coder@69c1d98GHSA-wcx9-ccpj-hx3c is a medium-severity (CVSS 4.3) Open Redirect vulnerability in github.com/coder/coder/v2. A fix is available for github.com/coder/coder/v2 — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
github.com/coder/coder/v2🐹github.com/coder/coder/v2🐹github.com/coder/coder/v2Real-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
Summary
An issue on Coder's login page allows attackers to craft a Coder URL that when clicked by a logged in user could redirect them to a website the attacker controls, e.g. https://google.com.
Details
On the login page, Coder checks for the presence of a redirect query parameter. On successful login, the user would be redirected to the location of the parameter. Improper sanitization allows attackers to specify a URL outside of the Coder application to redirect users to.
Impact
Coder users could potentially be redirected to a untrusted website if tricked into clicking a URL crafted by the attacker. Coder authentication tokens are not leaked to the resulting website.
To check if your deployment is vulnerable, visit the following URL for your Coder deployment:
https://<coder url>/login?redirect=https%3A%2F%2Fcoder.com%2Fdocs
Patched Versions
This vulnerability is remedied in
- v2.16.1
- v2.15.3
- v2.14.4
All versions prior to 2.3.1 are not affected.
Thanks
References
https://github.com/coder/coder/security/advisories/GHSA-wcx9-ccpj-hx3c https://github.com/coder/coder/commit/69c1d981e3131e50d52b01f6a360abadaad699e6
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/coder/coder/v2 | ≥ 2.16.0&&< 2.16.1 | 2.16.1go get github.com/coder/coder/v2@v2.16.1 |
| 🐹Go | github.com/coder/coder/v2 | ≥ 2.15.0&&< 2.15.3 | 2.15.3go get github.com/coder/coder/v2@v2.15.3 |
| 🐹Go | github.com/coder/coder/v2 | ≥ 2.3.1&&< 2.14.4 | 2.14.4go get github.com/coder/coder/v2@v2.14.4 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/coder/coder/v2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/coder/coder/v2 to 2.16.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-wcx9-ccpj-hx3c 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 GHSA-wcx9-ccpj-hx3c in your dependencies?
Find it across Go, including transitive dependencies.