Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹 Go

GHSA-wcx9-ccpj-hx3c

MEDIUM

Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect')

Also known asGO-2024-3228
Published
Oct 28, 2024
Updated
Oct 30, 2024
Affected
3 pkgs
Patched
3 / 3
Exploits
None indexed

Blast Radius

3 pkgs affected
🐹github.com/coder/coder/v2🐹github.com/coder/coder/v2🐹github.com/coder/coder/v2

Real-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

3 total 3 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/coder/coder/v22.16.0&&< 2.16.12.16.1
🐹Gogithub.com/coder/coder/v22.15.0&&< 2.15.32.15.3
🐹Gogithub.com/coder/coder/v22.3.1&&< 2.14.42.14.4

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/coder/coder/v2. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

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

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-wcx9-ccpj-hx3c is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-wcx9-ccpj-hx3c. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### 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
O3 Security · Impact-Aware SCA

Is GHSA-wcx9-ccpj-hx3c in your dependencies?

O3 detects GHSA-wcx9-ccpj-hx3c across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.