The vulnerability is a stored HTML injection (Cross-Site Scripting) within the Coder platform's agent log viewer. The root cause is the improper use of the ansi-to-html library. The AgentLogLine component in the file site/src/modules/resources/AgentLogs/AgentLogLine.tsx was responsible for converting log lines containing ANSI escape codes into HTML for display. The patch in commit f06b9d55df2880389e7f684c0644584b79a1e413 clearly shows the fix: the AnsiToHTML converter is instantiated with the escapeXML: true option. Previously, this option was omitted, causing the library to not escape HTML metacharacters within the log text. Consequently, if an attacker could write log entries containing HTML, any user (including administrators) viewing those logs would have that HTML rendered in their browser. This could lead to session hijacking, UI redressing, or data exfiltration. The vulnerable function is the AgentLogLine React component, which would be the component rendering the malicious content during runtime.