public@0.1.3 vulnerabilities

Run http server hosting static files with specified public dir & port

Direct Vulnerabilities

Known vulnerabilities in the public 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
  • L
Cross-site Scripting (XSS)

public is a package used for running static file hosting server with specified public dir & port. Also it supports a "direcotry index" like Apache httpd.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) attacks. It allows to embed HTML in file names, which (in certain conditions) might lead to execute malicious JavaScript.

Vulnerable Code:

// node_modules/public/bin/public, line 106:
files.forEach(function(file) {
    list.push('<li><a href="', path.join(base, file),'">', file, '</a></li>');
});

How to fix Cross-site Scripting (XSS)?

Upgrade public to version 0.1.4 or higher.

<0.1.4
  • L
Cross-site Scripting (XSS)

public is a package used for running static file hosting server with specified public dir & port. Also it supports a "direcotry index" like Apache httpd.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) attacks. It allows to embed HTML in file names, which (in certain conditions) might lead to execute malicious JavaScript.

Vulnerable Code:

// node_modules/public/bin/public, line 106:
files.forEach(function(file) {
    list.push('<li><a href="', path.join(base, file),'">', file, '</a></li>');
});

How to fix Cross-site Scripting (XSS)?

Upgrade public to version 0.1.4 or higher.

<0.1.4