GHSA-wcx9-ccpj-hx3c: Github.com/coder/coder/v2 Coder Vulnerable To Post-auth URL Vulnerability
MODERATEGHSA-wcx9-ccpj-hx3c is a MODERATE (CVSS 4.3) coder vulnerable to post-auth url vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Github.com/coder/coder/v2 libraries in the Go ecosystem. The issue involves coder vulnerable to post-auth url redirection to untrusted site ('open redirect'). Remediation is available by upgrading affected packages to version 2.16.1, 2.15.3, 2.14.4.
GHSA-wcx9-ccpj-hx3c at a Glance
Security Impact
CVSS: 4.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N).
How to Fix GHSA-wcx9-ccpj-hx3c
To remediate this vulnerability, upgrade all affected Github.com/coder/coder/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/coder/coder/v2 to 2.16.1
Upgrade github.com/coder/coder/v2 to 2.15.3
Upgrade github.com/coder/coder/v2 to 2.14.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/coder/coder/v2
How to Check if You Are Affected
To determine whether your application is affected by GHSA-wcx9-ccpj-hx3c, inspect your project dependencies for Github.com/coder/coder/v2:
inspect dependencies for github.com/coder/coder/v2
Analyze the terminal output to locate any version of Github.com/coder/coder/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.16.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Github.com/coder/coder/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-wcx9-ccpj-hx3c Affected Github.com/coder/coder/v2 Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/coder/coder/v2
|
Go |
≥ 2.16.0
< 2.16.1
All 1 versions
2.16.0
|
2.16.1
|
|
github.com/coder/coder/v2
|
Go |
≥ 2.15.0
< 2.15.3
|
2.15.3
|
|
github.com/coder/coder/v2
|
Go |
≥ 2.3.1
< 2.14.4
|
2.14.4
|
References
Frequently Asked Questions
What is GHSA-wcx9-ccpj-hx3c?
Which Github.com/coder/coder/v2 versions are affected?
What version fixes GHSA-wcx9-ccpj-hx3c?
Is github.com/coder/coder/v2 affected?
What is the CVSS score of GHSA-wcx9-ccpj-hx3c?
What CWE is associated with GHSA-wcx9-ccpj-hx3c?
How can I check Go dependencies for GHSA-wcx9-ccpj-hx3c?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wcx9-ccpj-hx3c",
"modified" : "2024-10-30T18:50:39Z",
"published" : "2024-10-28T18:31:57Z",
"aliases" : [ ],
"summary" : "Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect')",
"details" : "### 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",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/coder/coder/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.16.0"
}, {
"fixed" : "2.16.1"
} ]
} ],
"versions" : [ "2.16.0" ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/coder/coder/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.15.0"
}, {
"fixed" : "2.15.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/coder/coder/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.3.1"
}, {
"fixed" : "2.14.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/coder/coder/security/advisories/GHSA-wcx9-ccpj-hx3c"
}, {
"type" : "WEB",
"url" : "https://github.com/coder/coder/commit/69c1d981e3131e50d52b01f6a360abadaad699e6"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/coder/coder"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-10-28T18:31:57Z",
"nvd_published_at" : null
}
}