Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Workspace proxy hostname prefix match lets an attacker-controlled domain steal a victim's workspace app credential

High
jdomeracki-coder published GHSA-h58h-qvv5-xvwg Aug 10, 2026

Package

Codestin Search App github.com/coder/coder/v2 (Go)

Affected versions

>= 2.35.0, < 2.35.4
>= 2.34.0, < 2.34.8
>= 2.33.0, < 2.33.12
< 2.29.20

Patched versions

2.35.4
2.34.8
2.33.12
2.29.20

Description

Summary

GetWorkspaceProxyByHostname validated a redirect target's host with a PostgreSQL SIMILAR TO pattern ('[^:]*://' || hostname || '([:/]?%)*') that was effectively a prefix match rather than an exact-host match. Because the trailing delimiter group was optional ([:/]?), any host that is a string prefix of a configured workspace-proxy access URL was treated as a trusted proxy (for example syd.co matched syd.coder-proxy.example.com).

Note: Practical exploitation requires an authenticated victim to open an attacker-crafted auth-redirect link, and the attacker to own a domain that is a string prefix of a real workspace-proxy access URL.

Impact

When an authenticated victim opens a crafted /api/v2/applications/auth-redirect?redirect_uri=... link, Coder treats the attacker's prefix domain as a trusted proxy, mints an application_connect-scoped API key for the victim, and 302-redirects the browser to the attacker's domain with the encrypted key in the query string. The key is not bound to the host it was issued for, so the attacker can replay the blob against the genuine proxy within its validity window and obtain a cookie carrying the victim's full-lifetime application_connect key, granting access to the victim's workspace apps.

Patches

The fix requires a hostname boundary after the hostname: either end of string, or : for a port, or / for a path (([:/]%)*). URLs whose host exactly matches the candidate, including URLs with ports or paths, still match. A hostname that is merely a prefix of the configured host no longer matches.

The fix was backported to all supported release lines:

Release line Patched version
2.35 (Mainline) v2.35.4
2.34 (Stable) v2.34.8
2.33 (Security Support) v2.33.12
2.29 (ESR) v2.29.20

Release lines 2.30 through 2.32 are end-of-life and will not receive a patch.

Workarounds

There is no configuration-only workaround. Upgrade to a patched release. Deployments that do not use workspace proxies are not affected.

Credits

We'd like to thank Anthropic's Security Team (ANT-2026-FXER0JGJ) and Adam Korczynski of Ada Logics for validating and reporting this issue.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N

CVE ID

No known CVE

Weaknesses

Insufficiently Protected Credentials

The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval. Learn more on MITRE.

URL Redirection to Untrusted Site ('Open Redirect')

The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. Learn more on MITRE.

Incorrect Comparison

The product compares two entities in a security-relevant context, but the comparison is incorrect, which may lead to resultant weaknesses. Learn more on MITRE.