CVE-2026-55437: Coder Agent Log XSS Vulnerability – Patch Guide & Detection
Coder, a platform for provisioning remote development environments, contains a stored cross-site scripting (XSS) vulnerability in its dashboard logging component. When workspace agent logs contain HTML or script code, the dashboard renders this content as live markup rather than displaying it as plain text. An attacker who can control what appears in agent logs can inject malicious scripts that execute in the browser of any user viewing those logs. This requires the attacker to first compromise or control a workspace agent, then trick an administrator or developer into viewing the poisoned logs.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.4 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Weaknesses (CWE)
- CWE-79
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-07-08 / 2026-07-08
NVD description (verbatim)
Coder allows organizations to provision remote development environments via Terraform. Prior to versions 2.29.17, 2.32.7, 2.33.8, and 2.34.2, the `AgentLogLine` dashboard component instantiated `ansi-to-html` without `escapeXML: true` and inserted the result via `dangerouslySetInnerHTML` so HTML embedded in workspace agent log lines was rendered as live markup. Server-side sanitization did not neutralize HTML metacharacters. Exploitation requires a victim to view attacker-controlled agent logs in the dashboard. The fix in versions 2.29.17, 2.32.7, 2.33.8, and 2.34.2 enables `escapeXML: true` so HTML metacharacters are escaped before DOM insertion. No known workarounds are available.
6 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability exists in the `AgentLogLine` dashboard component, which processes ANSI escape sequences using the `ansi-to-html` library without setting the `escapeXML: true` parameter. The resulting HTML is inserted into the DOM via React's `dangerouslySetInnerHTML` property. Because server-side sanitization does not neutralize HTML metacharacters, any HTML tags or JavaScript in log output bypass client-side protections. The attack vector is stored XSS: malicious content persists in agent logs until viewed. Versions 2.29.17, 2.32.7, 2.33.8, and 2.34.2 resolve this by enabling XML escaping in the `ansi-to-html` call, ensuring HTML metacharacters are escaped before DOM insertion.
Business impact
An authenticated attacker with the ability to manipulate workspace agent output can execute arbitrary JavaScript in the browsers of administrators or developers who view those logs. This may result in session hijacking, credential theft, lateral movement to other workspaces, or defacement of the dashboard interface. The attack surface is limited to users with visibility into agent logs, but in typical Coder deployments, multiple team members may monitor logs for troubleshooting. The impact is heightened if logs contain sensitive information that attackers can exfiltrate via injected scripts.
Affected systems
Coder versions prior to 2.29.17, 2.32.7, 2.33.8, and 2.34.2 are affected. Organizations must identify which version is deployed and verify the patch level. Consult the Coder release notes or your instance's admin panel to confirm the running version. The vulnerability only manifests if the dashboard is actively used to view agent logs; headless or CLI-only deployments have reduced exposure but should still patch.
Exploitability
Exploitation is feasible but requires preconditions. The attacker must either control a workspace agent (through a compromised agent token or access to the agent runtime) or have the ability to inject content into agent log streams. Once payload is in place, exploitation is trivial—simply waiting for a user to view the logs in the dashboard is sufficient. No complex user interaction beyond normal log viewing is required. The CVSS score of 5.4 (MEDIUM) reflects these requirements: network-accessible but requires prior authentication and user interaction to trigger the XSS payload.
Remediation
Upgrade to version 2.29.17, 2.32.7, 2.33.8, or 2.34.2 or later, depending on your current release line. No workarounds are documented; patching is the only mitigation. Organizations unable to patch immediately should restrict access to the agent logs dashboard to trusted administrators and monitor for suspicious log content or unusual script execution in dashboards.
Patch guidance
Coder publishes updates in parallel release lines. Identify your current version (Settings > About or `coder version` command). If running 2.29.x, upgrade to 2.29.17 or later. If running 2.32.x, upgrade to 2.32.7 or later. If running 2.33.x, upgrade to 2.33.8 or later. If running 2.34.x, upgrade to 2.34.2 or later. For versions newer than 2.34.2, verify you are on the latest patch release. Test in a non-production environment first. Plan for brief downtime during the upgrade; Coder deployments typically restart cleanly.
Detection guidance
Monitor dashboard access logs for unusual patterns of log viewing, especially during off-hours. Audit agent log content for HTML tags, script elements, or ANSI sequences that appear anomalous. Review workspace agent token usage and revoke any tokens not associated with known deployments. In the dashboard, look for log lines containing characters like `<`, `>`, or `&` in unexpected contexts—these may indicate escape failures. Correlate log viewing events with subsequent suspicious network requests from user browsers (e.g., beacon calls to attacker infrastructure).
Why prioritize this
This vulnerability merits prompt patching because it affects a core dashboard feature and requires no special exploit code. However, the MEDIUM severity and the requirement for prior agent control or log injection limit the immediate risk in most environments. Organizations with strict access controls on agent configuration and log sources can deprioritize slightly, but public-facing Coder instances or those in multi-tenant environments should patch within 2 weeks. The lack of a KEV listing indicates this is not yet widely exploited in the wild.
Risk score, explained
The CVSS 3.1 score of 5.4 (MEDIUM, AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N) reflects: network accessibility (AV:N), low attack complexity (AC:L), requirement for prior authentication (PR:L), user interaction needed to view logs (UI:R), changed scope due to cross-context JavaScript execution (S:C), and limited confidentiality and integrity impact (C:L/I:L). Availability is not impacted. The score correctly places this below CRITICAL/HIGH but above LOW—a real risk that should not be ignored.
Frequently asked questions
Can this vulnerability be exploited without any prior access to Coder?
No. The attacker must either control a workspace agent (which requires a valid agent token or access to the agent runtime environment) or have some means to inject content into agent log streams. This effectively requires authentication or a prior compromise.
If we have access controls preventing most users from viewing agent logs, are we still at risk?
Your risk is lower but not eliminated. Any authenticated user who can view logs—even if it's only your platform team—is a potential target. If a user's session is hijacked or their browser is compromised, the attacker gains a foothold in your infrastructure. We recommend patching regardless of access controls.
Does Coder have any built-in safeguards that reduce risk until we patch?
No documented workarounds exist. However, avoiding unnecessary dashboard access to agent logs and using strong authentication (e.g., OIDC, IP whitelisting) for your Coder instance reduces the likelihood of a user viewing malicious logs.
Will the patch break any log formatting or ANSI color output?
No. The fix only escapes HTML metacharacters so they display as text rather than as markup. ANSI escape sequences for colors and formatting are preserved and will continue to work normally in the logs.
This analysis is provided for informational purposes only and does not constitute professional security advice. Organizations should verify patch availability, compatibility with their deployment, and conduct testing before applying updates. SEC.co does not guarantee the completeness or accuracy of version numbers and remediation steps; consult official Coder documentation and release notes for authoritative guidance. No exploit code or proof-of-concept is provided in this advisory. Source: NVD (public-domain), retrieved 2026-08-16. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2016-20070MEDIUMPrivilege Escalation & Stored XSS in WordPress Booking Calendar Contact Form 1.0.23
- CVE-2018-25384MEDIUMStored XSS in Wikidforum 2.20 Allows Authenticated Attackers to Inject Malicious Scripts
- CVE-2019-25731MEDIUMStored XSS in Zuz Music 2.1 Contact Form
- CVE-2019-25737MEDIUMStored XSS in Live Chat Unlimited 2.8.3 – Admin Session Compromise
- CVE-2019-25739MEDIUMGigToDo 1.3 Stored XSS Vulnerability in Proposal Descriptions
- CVE-2019-25742MEDIUMStored XSS in Zoner Real Estate WordPress Theme 4.1.1 – Admin Account Compromise Risk
- CVE-2019-25743MEDIUMWordPress Soliloquy Lite 2.5.6 Stored XSS Vulnerability
- CVE-2019-25744MEDIUMWordPress Popup Builder 3.49 Stored XSS Vulnerability – Exploit Prevention & Patch Guide