{ "schema_version": "1.4.0", "id": "GHSA-6hrw-x7pr-4mp8", "modified": "2025-03-14T19:56:46Z", "published": "2025-03-10T19:28:38Z", "aliases": [ "CVE-2024-52812" ], "summary": "LF Edge eKuiper allows Stored XSS in Rules Functionality", "details": "### Summary\nStored 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.\n\n### Details\n\nA 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.\n\nThe issue appears as the notification to user is made in an insafe way:\n\nhttps://github.com/lf-edge/ekuiper/blob/dbce32d5a195cf1de949b3a6a4e29f0df0f3330d/internal/server/rest.go#L681\n\nhttps://github.com/lf-edge/ekuiper/blob/dbce32d5a195cf1de949b3a6a4e29f0df0f3330d/internal/server/rest.go#L716\n\nhttps://github.com/lf-edge/ekuiper/blob/dbce32d5a195cf1de949b3a6a4e29f0df0f3330d/internal/server/rest.go#L735\n\nhttps://github.com/lf-edge/ekuiper/blob/dbce32d5a195cf1de949b3a6a4e29f0df0f3330d/internal/server/rest.go#L794\n\nhttps://github.com/lf-edge/ekuiper/blob/dbce32d5a195cf1de949b3a6a4e29f0df0f3330d/internal/server/rest.go#L809\n\nhttps://github.com/lf-edge/ekuiper/blob/dbce32d5a195cf1de949b3a6a4e29f0df0f3330d/internal/server/rest.go#L824\n\nSuch writing to 'http.ResponseWriter' bypasses HTML escaping that prevents cross-site scripting vulnerabilities.\n\nBecause 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\n\n### PoC\n1. Create a rule with id:\n```\n