Skip to content
Heist/ feed
Back to feed
MediumFix available

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

Type: advisorySources: OSV

### 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:///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 - https://github.com/jchristov ### References https://github.com/coder/coder/security/advisories/GHSA-wcx9-ccpj-hx3c https://github.com/coder/coder/commit/69c1d981e3131e50d52b01f6a360abadaad699e6

Products
github.com/coder/coder/v2
Affected versions
2.16.0
Fixed versions
2.14.4, 2.15.3, 2.16.1
CVEs
CVE-2024-58398
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 06:41 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 28 Oct 2024, 18:31 UTC

### 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:///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 - https://github.com/jchristov ### References https://github.com/coder/coder/security/advisories/GHSA-wcx9-ccpj-hx3c https://github.com/coder/coder/commit/69c1d981e3131e50d52b01f6a360abadaad699e6

osv:GHSA-wcx9-ccpj-hx3c

github.com/coder/coder/v2

Fixed versions: 2.16.1

github.com/coder/coder/v2

Fixed versions: 2.15.3

github.com/coder/coder/v2

Fixed versions: 2.14.4

Complete source record
{
  "id": "decc38311d324b4f944df4587211a3d48ad2cf0e653f70ac51b8d2b968bc7891",
  "url": "https://osv.dev/vulnerability/GHSA-wcx9-ccpj-hx3c",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect')",
    "summary": "### 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:///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 - https://github.com/jchristov ### References https://github.com/coder/coder/security/advisories/GHSA-wcx9-ccpj-hx3c https://github.com/coder/coder/commit/69c1d981e3131e50d52b01f6a360abadaad699e6",
    "evidence": "osv:GHSA-wcx9-ccpj-hx3c",
    "products": [
      {
        "name": {
          "value": "github.com/coder/coder/v2",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.16.1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "2.16.0",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "github.com/coder/coder/v2",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.15.3",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "github.com/coder/coder/v2",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.14.4",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "GHSA-wcx9-ccpj-hx3c",
      "aliases": [
        "CVE-2024-58398",
        "GHSA-wcx9-ccpj-hx3c",
        "GO-2024-3228"
      ],
      "metrics": [
        {
          "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": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "2.16.0"
                },
                {
                  "fixed": "2.16.1"
                }
              ]
            }
          ],
          "package": {
            "name": "github.com/coder/coder/v2",
            "purl": "pkg:golang/github.com/coder/coder/v2",
            "ecosystem": "Go"
          },
          "versions": [
            "2.16.0"
          ],
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/10/GHSA-wcx9-ccpj-hx3c/GHSA-wcx9-ccpj-hx3c.json"
          }
        },
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "2.15.0"
                },
                {
                  "fixed": "2.15.3"
                }
              ]
            }
          ],
          "package": {
            "name": "github.com/coder/coder/v2",
            "purl": "pkg:golang/github.com/coder/coder/v2",
            "ecosystem": "Go"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/10/GHSA-wcx9-ccpj-hx3c/GHSA-wcx9-ccpj-hx3c.json"
          }
        },
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "2.3.1"
                },
                {
                  "fixed": "2.14.4"
                }
              ]
            }
          ],
          "package": {
            "name": "github.com/coder/coder/v2",
            "purl": "pkg:golang/github.com/coder/coder/v2",
            "ecosystem": "Go"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/10/GHSA-wcx9-ccpj-hx3c/GHSA-wcx9-ccpj-hx3c.json"
          }
        }
      ],
      "modified": "2026-10-18T10:55:48.018610412Z",
      "provider": "osv",
      "references": [
        "https://github.com/coder/coder/security/advisories/GHSA-wcx9-ccpj-hx3c",
        "https://github.com/coder/coder/commit/69c1d981e3131e50d52b01f6a360abadaad699e6",
        "https://github.com/coder/coder"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-601"
        ],
        "severity": "MODERATE",
        "github_reviewed": true,
        "nvd_published_at": null,
        "github_reviewed_at": "2024-10-28T18:31:57Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-58398",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/1/score"
  },
  "source_id": "core-osv",
  "document_id": 370026,
  "published_at": "2024-10-28T18:31:57+00:00"
}