Stored Cross-Site Scripting in Chat and Forum Translation Controls in ail-framework
ail-project ail-framework
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| ail-project ail-framework |
| No fix yet |
Original description
AIL Project contains a stored cross-site scripting vulnerability in the translation controls displayed for chat messages and forum posts.
The affected templates inserted message and post identifiers directly into inline JavaScript onclick handlers:
onclick="translateMessageToPreferredLanguage('{{ message['id'] }}', '{{ mess_id_escape }}', this)"
and:
onclick="translatePostToPreferredLanguage('{{ post['id'] }}', '{{ post_id_escape }}', this)"
These values were HTML-template escaped but were not safely encoded for use as JavaScript string literals inside an HTML attribute. A specially crafted identifier containing quotation marks, escape characters, or other JavaScript syntax could therefore terminate the expected string argument and inject arbitrary JavaScript into the event handler.