A cross-site scripting vulnerability in the ansi2html library allowed attackers to compromise Sourcehut accounts by injecting malicious payloads into build logs. The exploit leveraged the way these logs were rendered in the web interface, bypassing standard sanitization measures. This incident highlights the risks associated with rendering untrusted output from build pipelines directly in browser environments.
- Audit build log rendering pipelines for XSS vulnerabilities.
- Sanitize ANSI escape sequences before HTML conversion.
- Review trust boundaries between build artifacts and UI.
- Ensure strict Content Security Policies for internal tools.