Cross-site scripting in Mongoose - #VU167580

 

Cross-site scripting in Mongoose - #VU167580

Published: November 18, 2026


Vulnerability identifier: #VU167580
CSH Severity: Low
CVSS v4: 5.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N]
CVE-ID: N/A
CWE-ID: CWE-79
Exploitation vector: Remote access
Exploit availability: No public exploit available

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.


Affected software

Mongoose

Remediation

Install security update from vendor's website.

Mongoose - update to 7.22

External References

Related Security Bulletins