CVE-2018-3771
UNKNOWN
Published 2018-07-20T22:00:00Z
Actions:
Expert Analysis
Professional remediation guidance
Get tailored security recommendations from our analyst team for CVE-2018-3771. We'll provide specific mitigation strategies based on your environment and risk profile.
No CVSS data available
Description
An XSS in statics-server <= 0.0.9 can be used via injected iframe in the filename when statics-server displays directory index in the browser.
Available Exploits
No exploits available for this CVE.
Related News
No news articles found for this CVE.
Affected Products
Affected Versions:
GitHub Security Advisories
Community-driven vulnerability intelligence from GitHub
Advisory Details
An XSS in statics-server <= 0.0.9 can be used via injected iframe in the filename when statics-server displays directory index in the browser. Statics-server does not implement any HTML escaping when displays directory index in the browser. Variable `v` is used in `<a href>` element without escaping, which allows to embed HTML `<iframe>` tag with `src` attribute points to another HTML file in the directory. This file can contain malicious JavaScript code, which will be executed:
```js
// ./node_modules/statics-server/index.js, line 18:
if(fs.lstatSync(staticPath).isDirectory()){
var files=fs.readdirSync(staticPath);
var lis='';
files.forEach((v,i)=>{
if(fs.lstatSync(path.resolve(staticPath,v)).isDirectory()){
lis+=`<li><a href="${req.url}${v}/">${v}/</a></li>`;
}else {
lis+=`<li><a href="${req.url}${v}">${v}</a></li>`
}
});
(...)
```
Affected Packages
npm
statics-server
ECOSYSTEM:
≥0
≤0.0.9
CVSS Scoring
CVSS Score
5.0
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
References
Advisory provided by GitHub Security Advisory Database. Published: May 13, 2022, Modified: April 22, 2024
References
Published: 2018-07-20T22:00:00Z
Last Modified: 2024-09-16T17:03:15.839Z
Copied to clipboard!