diff --git a/public/index.html b/public/index.html
index ff71cc6..9ea140e 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1264,6 +1264,7 @@
No Staged Changes
// Append all file items to the container in a single operation
container.appendChild(fragment);
} catch (error) {
+ // SECURITY: escapeHtml prevents XSS if error message contains malicious input
document.getElementById('fileList').innerHTML = `
Error loading files: ${escapeHtml(error.message)}