We are using SonarQube Community / Developer Build deployed via Docker in an internal environment.
During a recent security assessment, it was observed that the Project Display Name field accepts HTML input (for example <h1>Test</h1>) and renders it in the UI. This behavior was flagged by the security team as Improper Input Validation (CWE‑20) / UI‑level HTML injection.
We understand that:
SonarQube is an administrative DevOps tool
Access is intended for authenticated and trusted users
SonarQube is commonly secured via authentication, access control, and reverse‑proxy hardening
We would appreciate clarification on the following points:
Is accepting and rendering HTML input in administrative UI fields (such as Project Display Name) considered expected behavior in SonarQube?
For such UI‑level findings, is the recommended security approach to mitigate risk by:
enforcing authentication,
restricting access to trusted users,
and applying reverse‑proxy controls (e.g., CSP, security headers), rather than modifying or sanitizing the SonarQube UI?
Are there any official hardening or best‑practice recommendations to address UI input handling in SonarQube?
Only the latest version of SonarQube Community Build is considered active, so you’ll need to update and see if the situation is still replicable before we can help you.
We reviewed this behavior on SonarQube Enterprise Edition v26.2. The tool allows HTML-like input (e.g. <h1>Test</h1>) in the project name field; however, the input is safely escaped and treated as plain text. The HTML is neither rendered nor executed in the UI.
we are able to create project with this name <h1>Test</h1>.
Thank you for your detailed explanation — it was very helpful.
To ensure we address the observation correctly, we just want to confirm our understanding. Based on our analysis and your guidance, the behavior where SonarQube accepts HTML‑like values in the project name (while safely escaping and not executing them) is an intended UI‑level behavior rather than a backend input‑validation requirement by changing configurations.
Could you please confirm that, from a SonarSource perspective, this should indeed be considered UI behavior by design.
This confirmation will help us align our response accurately with the team.
Thanks again for your support.
Regards,
Salma