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

exploitDog

github логотип

GHSA-6hrw-x7pr-4mp8

Опубликовано: 10 мар. 2025
Источник: github
Github: Прошло ревью
CVSS3: 5.4

Описание

LF Edge eKuiper allows Stored XSS in Rules Functionality

Summary

Stored Cross-Site Scripting (XSS) vulnerability allows attackers to inject malicious scripts into web applications, which can then be executed in the context of other users' browsers. This can lead to unauthorized access to sensitive information, session hijacking, and spreading of malware, impacting user data privacy and application integrity.

Details

A user with rights to modificate the service (e.g. kuiperUser role) can inject XSS Payload into Rule id parameter. Then, after any user with access to this service (e.g. admin) will try make any modifications with the rule (update, run, stop, delete), a payload will act in victim's browser.

The issue appears as the notification to user is made in an insafe way:

https://github.com/lf-edge/ekuiper/blob/dbce32d5a195cf1de949b3a6a4e29f0df0f3330d/internal/server/rest.go#L681

https://github.com/lf-edge/ekuiper/blob/dbce32d5a195cf1de949b3a6a4e29f0df0f3330d/internal/server/rest.go#L716

https://github.com/lf-edge/ekuiper/blob/dbce32d5a195cf1de949b3a6a4e29f0df0f3330d/internal/server/rest.go#L735

https://github.com/lf-edge/ekuiper/blob/dbce32d5a195cf1de949b3a6a4e29f0df0f3330d/internal/server/rest.go#L794

https://github.com/lf-edge/ekuiper/blob/dbce32d5a195cf1de949b3a6a4e29f0df0f3330d/internal/server/rest.go#L809

https://github.com/lf-edge/ekuiper/blob/dbce32d5a195cf1de949b3a6a4e29f0df0f3330d/internal/server/rest.go#L824

Such writing to 'http.ResponseWriter' bypasses HTML escaping that prevents cross-site scripting vulnerabilities.

Because of the some (meybe protection) mechanisms a real exploitation is possible only with limited special characters, but this is enough to construct a strong payload

PoC

  1. Create a rule with id:
<iframe src="javascript:alert`1337`">

Creating a malicious Rule

  1. Just after Rule Submition the Payload shoots:

Running Payload

  1. Then, when another user (e.g. admin) will try to do something with this rule (e.g. start), the payload shoots in his context:

Exploiting the admin

Impact

Stored Cross-site Scripting (XSS) vulnerability

Reported by Alexey Kosmachev, Lead Pentester from Bi.Zone

Пакеты

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

github.com/lf-edge/ekuiper/v2

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

< 2.0.8

2.0.8

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

github.com/lf-edge/ekuiper

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

<= 1.14.7

Отсутствует

EPSS

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

5.4 Medium

CVSS3

Дефекты

CWE-79

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

CVSS3: 5.4
nvd
11 месяцев назад

LF Edge eKuiper is an internet-of-things data analytics and stream processing engine. Prior to version 2.0.8, auser with rights to modify the service (e.g. kuiperUser role) can inject a cross-site scripting payload into the rule `id` parameter. Then, after any user with access to this service (e.g. admin) tries make any modifications with the rule (update, run, stop, delete), a payload acts in the victim's browser. Version 2.0.8 fixes the issue.

EPSS

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

5.4 Medium

CVSS3

Дефекты

CWE-79