Описание
Vite is a website frontend framework. When Vite's HTML transformation is invoked manually via server.transformIndexHtml, the original request URL is passed in unmodified, and the html being transformed contains inline module scripts (<script type="module">...</script>), it is possible to inject arbitrary HTML into the transformed output by supplying a malicious URL query string to server.transformIndexHtml. Only apps using appType: 'custom' and using the default Vite HTML middleware are affected. The HTML entry must also contain an inline script. The attack requires a user to click on a malicious URL while running the dev server. Restricted files aren't exposed to the attacker. This issue has been addressed in vite@5.0.5, vite@4.5.1, and vite@4.4.12. There are no known workarounds for this vulnerability.
A cross-site scripting (XSS) vulnerability was found in vitejs that can be triggered by sending a malicious payload through server.transformIndexHtml.
Отчет
The vulnerability within Vite's HTML transformation process poses a moderate severity issue due to its potential for exploitation in specific development environments. While it requires certain conditions to be met, such as utilizing the appType: 'custom' configuration and containing inline module scripts in the HTML, the impact can still be significant. Attackers can inject arbitrary HTML into the transformed output by manipulating the request URL, leading to Cross-Site Scripting (XSS) attacks. Although exploitation relies on users clicking on malicious URLs during development server runtime, the ability to inject arbitrary code into the transformed output could facilitate further attacks or unauthorized access to sensitive data.
Меры по смягчению последствий
Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
Затронутые пакеты
| Платформа | Пакет | Состояние | Рекомендация | Релиз |
|---|---|---|---|---|
| Red Hat Ansible Automation Platform 2 | automation-controller | Not affected | ||
| Red Hat Ansible Automation Platform 2 | automation-eda-controller | Not affected | ||
| Red Hat Build of Keycloak | vitejs | Will not fix | ||
| Red Hat JBoss Enterprise Application Platform 8 | vitejs | Not affected | ||
| Red Hat OpenShift distributed tracing 2 | rhosdt/jaeger-agent-rhel8 | Affected |
Показывать по
Дополнительная информация
Статус:
EPSS
6.1 Medium
CVSS3
Связанные уязвимости
Vite is a website frontend framework. When Vite's HTML transformation is invoked manually via `server.transformIndexHtml`, the original request URL is passed in unmodified, and the `html` being transformed contains inline module scripts (`<script type="module">...</script>`), it is possible to inject arbitrary HTML into the transformed output by supplying a malicious URL query string to `server.transformIndexHtml`. Only apps using `appType: 'custom'` and using the default Vite HTML middleware are affected. The HTML entry must also contain an inline script. The attack requires a user to click on a malicious URL while running the dev server. Restricted files aren't exposed to the attacker. This issue has been addressed in vite@5.0.5, vite@4.5.1, and vite@4.4.12. There are no known workarounds for this vulnerability.
Vite is a website frontend framework. When Vite's HTML transformation ...
Vite XSS vulnerability in `server.transformIndexHtml` via URL payload
Уязвимость функции server.transformIndexHtml() локального сервера разработки приложений Vite, позволяющая нарушителю проводить межсайтовые сценарные атаки
EPSS
6.1 Medium
CVSS3