CVE-2026-134362info

Summary

by MITRE • 11/21/2026

Coder 2.6.0 before 2.29.26, 2.30.0 before 2.34.18, 2.35.0 before 2.37.10, and 2.38.0 before 2.38.6 contains a cross-site request forgery vulnerability because CSRF exemption patterns in coderd/httpmw/csrf.go are matched as unanchored regular expressions, letting affected API routes skip CSRF token and same-origin checks. Attackers controlling a page same-site with the deployment can make signed-in users' browsers send forged POST requests that recreate dev containers or add users whose names contain derp to organizations.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 11/21/2026

The identified vulnerability represents a critical cross-site request forgery flaw within Coder, specifically affecting versions 2.6.0 through 2.29.25, 2.30.0 through 2.34.17, 2.35.0 through 2.37.9, and 2.38.0 through 2.38.5. This security defect stems from an implementation error in the server-side middleware responsible for handling cross-site request forgery protections, located within the coderd/httpmw/csrf.go module. The core technical issue arises because the regular expressions used to define exemption patterns are configured as unanchored matches rather than anchored ones. In regex syntax, an unanchored pattern will match a substring anywhere within the input string, whereas an anchored pattern requires the entire string or specific boundaries to align with the expression. This misconfiguration allows attackers to craft malicious URLs that inadvertently satisfy these overly permissive exemption criteria, thereby bypassing the intended security controls.

As a direct consequence of this flawed logic, affected API routes are incorrectly exempted from standard CSRF token validation and same-origin checks. These mechanisms are fundamental defenses designed to ensure that state-changing requests originate from legitimate user interactions within the application's own context rather than being forged by external malicious sites. By bypassing these checks, an attacker who controls a web page hosted on the same site as the Coder deployment can execute arbitrary actions on behalf of authenticated users without their knowledge or consent. The attack vector relies on social engineering or drive-by techniques where a victim visits a malicious webpage while logged into their Coder instance, triggering the forged requests automatically via browser cookies and session tokens that are sent along with every request to the same origin.

The operational impact of this vulnerability is significant due to the high-privilege actions it enables within the application environment. Specifically, attackers can force signed-in users' browsers to send POST requests that recreate development containers or add new users whose names contain the string derp to existing organizations. The recreation of dev containers allows an attacker to disrupt service availability for legitimate developers by destroying and recreating their workspaces, leading to potential data loss if local state is not persisted externally. Furthermore, the ability to add users with specific name patterns grants attackers a foothold within the organization's user base, potentially facilitating further lateral movement or privilege escalation depending on the default permissions assigned to new organizational members. This effectively compromises the integrity and availability of the development infrastructure managed by Coder.

From a classification perspective, this vulnerability aligns with CWE-352, which describes Cross-Site Request Forgery (CSRF), specifically highlighting issues related to insufficient verification of request origin or lack of anti-CSRF tokens for state-changing operations. It also maps to MITRE ATT&CK technique T1078, Valid Accounts, as the attack leverages legitimate user credentials and session cookies to perform unauthorized actions. Additionally, the root cause relates to CWE-20, Improper Input Validation, where the application fails to correctly validate the structure of request paths against security policies due to incorrect regex anchoring.

To mitigate this vulnerability, organizations must immediately upgrade their Coder instances to version 2.29.26 or later for the older release line, version 2.34.18 or later for the next segment, version 2.37.10 or later for the subsequent range, and version 2.38.6 or later for the most recent affected series. These patched versions correct the regular expression anchoring in the CSRF middleware to ensure that exemption patterns are applied strictly as intended, preventing malicious URLs from bypassing security checks. Until an upgrade is feasible, administrators should consider implementing additional network-level controls such as strict Content Security Policy headers and ensuring that no untrusted content can be served on the same domain or subdomain as the Coder deployment. Regular audits of middleware configurations for similar regex anchoring errors are also recommended to prevent recurrence in other parts of the application stack.

Disclosure

11/21/2026

Moderation

in review

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!