{"id":"CVE-2024-58398","aliases":["GHSA-wcx9-ccpj-hx3c","GO-2024-3228"],"title":"Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect')","summary":"Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect')","severity":"medium","cvss":4.3,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","vendor":"coder","product":"github.com/coder/coder/v2","ecosystem":"go","affected":["github.com/coder/coder/v2 >= 2.16.0, < 2.16.1","github.com/coder/coder/v2 >= 2.15.0, < 2.15.3","github.com/coder/coder/v2 >= 2.3.1, < 2.14.4"],"patched":["github.com/coder/coder/v2 2.16.1","github.com/coder/coder/v2 2.15.3","github.com/coder/coder/v2 2.14.4"],"published":"2024-10-28","updated":"2026-10-18","sourceUpdated":"2026-10-18T10:55:48.018610412Z","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-wcx9-ccpj-hx3c","references":[{"url":"https://github.com/coder/coder/security/advisories/GHSA-wcx9-ccpj-hx3c"},{"url":"https://github.com/coder/coder/commit/69c1d981e3131e50d52b01f6a360abadaad699e6"},{"url":"https://github.com/coder/coder"},{"url":"https://www.vulncheck.com/advisories/coder-2.3.1-before-2.16.1-open-redirect-via-login-page-redirect-parameter","label":"VulnCheck Advisory: Coder 2.3.1 before 2.16.1 Open Redirect via Login Page redirect Parameter"}],"tags":["osv","go","cve.org"],"cwe":["CWE-601"],"ingestedAt":"2026-10-17T19:08:56.995Z","slug":"CVE-2024-58398","body":"## Overview\n\n### Summary\nAn 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.\n\n### Details\nOn 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.\n\n### Impact\nCoder 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.\n\nTo check if your deployment is vulnerable, visit the following URL for your Coder deployment:\n- `https://<coder url>/login?redirect=https%3A%2F%2Fcoder.com%2Fdocs`\n\n### Patched Versions\nThis vulnerability is remedied in\n- v2.16.1\n- v2.15.3\n- v2.14.4\n\nAll versions prior to 2.3.1 are not affected.\n\n### Thanks\n- https://github.com/jchristov\n\n### References\nhttps://github.com/coder/coder/security/advisories/GHSA-wcx9-ccpj-hx3c\nhttps://github.com/coder/coder/commit/69c1d981e3131e50d52b01f6a360abadaad699e6\n\n## Affected packages\n\n- `github.com/coder/coder/v2 >= 2.16.0, < 2.16.1`\n- `github.com/coder/coder/v2 >= 2.15.0, < 2.15.3`\n- `github.com/coder/coder/v2 >= 2.3.1, < 2.14.4`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `github.com/coder/coder/v2 2.16.1`\n- `github.com/coder/coder/v2 2.15.3`\n- `github.com/coder/coder/v2 2.14.4`","depth":"sunlit","depthScore":24,"depthScoreParts":{"impact":23.7,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}