Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-393x-fr59-r8fg

Опубликовано: 13 мая 2022
Источник: github
Github: Прошло ревью
CVSS3: 6.1

Описание

statics-server Cross-site Scripting vulnerability

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:

// ./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>` } }); (...)

Пакеты

Наименование

statics-server

npm
Затронутые версииВерсия исправления

<= 0.0.9

Отсутствует

EPSS

Процентиль: 55%
0.00328
Низкий

6.1 Medium

CVSS3

Дефекты

CWE-79

Связанные уязвимости

CVSS3: 6.1
nvd
больше 7 лет назад

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.

EPSS

Процентиль: 55%
0.00328
Низкий

6.1 Medium

CVSS3

Дефекты

CWE-79