Cross-site scripting in Mongoose - #VU167580
Published: November 18, 2026
Vulnerability details
The vulnerability allows a remote user to execute JavaScript in visitors' browsers under the server origin, potentially stealing session tokens or altering displayed content.
The vulnerability exists due to missing HTML entity encoding in Mongoose's printdirentry() and listdir() functions when rendering filenames and decoded directory paths with MG_ENABLE_DIRLIST enabled. A remote user can create a file or directory named <img src=x onerror=alert(document.domain)> on the served filesystem and induce visitors to view the parent listing or the payload-named directory listing to execute JavaScript.