CVE-2025-58437 Coder's privilege escalation vulnerability could lead to a cross workspace compromise

High 8.1 Published Updated

Attackers can exploit unexpired session tokens in prebuilt workspaces to gain unauthorized access to other users' development environments.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-58437?

CVE-2025-58437 is a high-severity vulnerability in coder, published on 6 Sep 2025. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Coder allows organizations to provision remote development environments via Terraform. In versions 2.22.0 through 2.24.3, 2.25.0 and 2.25.1, Coder can be compromised through insecure session handling in prebuilt workspaces. Coder automatically generates a session token for a user when a workspace is started. It is automatically exposed via coder_workspace_owner.session_token. Prebuilt workspaces are initially owned by a built-in prebuilds system user. When a prebuilt workspace is claimed, a new session token is generated for the user that claimed the workspace, but the previous session token for the prebuilds user was not expired. Any Coder workspace templates that persist this automatically generated session token are potentially impacted. This is fixed in versions 2.24.4 and 2.25.2.

Weakness: CWE-613, CWE-279, CWE-277

Which versions are affected by CVE-2025-58437?

6 open source packages ship an affected version, including github.com/coder/coder/v2 and github.com/coder/coder. It affects 1 product.

PackageAffectedFixed in
github.com/coder/coder/v2 GoFrom 2.22.02.24.4, 2.25.2
github.com/coder/coder/v2 GoFrom 2.22.02.24.4
github.com/coder/coder/v2 GoFrom 2.22.02.24.4
github.com/coder/coder/v2 GoFrom 2.25.02.25.2
github.com/coder/coder/v2 GoFrom 2.25.02.25.2
github.com/coder/coder GoAll versionsNone

Products include Coder Coder.

How do I fix CVE-2025-58437?

Upgrade github.com/coder/coder/v2 to a fixed version for your release line: 2.24.4 or 2.25.2.

Is CVE-2025-58437 being exploited?

There is no known exploitation of CVE-2025-58437 in the wild and no public exploit code.

Sources

Also known as GHSA-j6xf-jwrj-v5qp, GO-2025-3938.

Is CVE-2025-58437 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free