CVE-2024-24807: Sulu HTML Injection via Autocomplete Suggestion

sulu/sulu Updated 02 Oct 2025

Summary

05/02/2024
Yes i
Low
Not published

CVE-2024-24807: Sulu HTML Injection via Autocomplete Suggestion. Affects sulu/sulu across 2 version ranges.

>= 2.0.0, < 2.4.16 >= 2.5.0, < 2.5.12

Fixed in 2.4.16 or 2.5.12, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Sulu is an open-source content management platform built on Symfony. It provides a flexible and extensible framework for creating and managing websites and web applications. Sulu allows users to create tags, and only admin users have the ability to create tags. The vulnerability in Sulu allows for HTML injection when inputting HTML into the tag name, which is executed when the tag name is listed in the autocomplete form. This vulnerability affects only admin users.

Vulnerability Detail

The HTML injection vulnerability in Sulu allows an attacker to inject malicious HTML code into the tag name, which is executed when the tag name is listed in the autocomplete form. This can lead to various security issues, such as cross-site scripting (XSS) attacks, where an attacker can execute arbitrary JavaScript code in the context of the admin user's session. Since only admin users can create tags, this vulnerability is limited to admin users.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 2.0.0, < 2.4.16 2.4.16
    composer require sulu/sulu:2.4.16
  • >= 2.5.0, < 2.5.12 2.5.12
    composer require sulu/sulu:2.5.12

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If users are unable to immediately upgrade to the patched versions, they can create a custom mutation observer to monitor and sanitize the tag name input, preventing the execution of any injected HTML code. Here is an example of how to create a custom mutation observer in JavaScript:

// Create a mutation observer
const observer = new MutationObserver((mutations) => {
  mutations.forEach((mutation) => {
    // Check if the tag name input has changed
    if (mutation.target.id === 'tag-name-input') {
      // Sanitize the input value
      const sanitizedValue = sanitizeHTML(mutation.target.value);
      // Set the sanitized value back to the input
      mutation.target.value = sanitizedValue;
    }
  });
});

// Start observing the tag name input
observer.observe(document.getElementById('tag-name-input'), { attributes: true, attributeFilter: ['value'] });

Conclusion

The HTML injection vulnerability in Sulu can be mitigated by upgrading to the patched versions or implementing the provided workaround. It is important for admin users of Sulu to take action to protect their systems from potential security risks. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for sulu/sulu →

Share this vulnerability

FAQ

Only admin users of Sulu are affected by this vulnerability. Regular users do not have the ability to create tags.

The impact of this vulnerability is that an attacker can inject malicious HTML code into the tag name, which is executed when the tag name is listed in the autocomplete form. This can lead to cross-site scripting (XSS) attacks and other security issues.

You can use the Vulert Playground at Vulert Scanner to check if your Sulu installation is affected by this vulnerability. Simply enter your composer.lock file and the playground will analyze it for any open-source vulnerabilities, including this one.

Yes, if you are unable to immediately upgrade to the patched versions, you can create a custom mutation observer to monitor and sanitize the tag name input, preventing the execution of any injected HTML code. Please refer to the 'workaround' section for an example.

For more information about this vulnerability, you can open an issue in the sulu/sulu repository on GitHub or email security@sulu.io.

Related vulnerabilities

Recent vulnerabilities recorded for sulu/sulu.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 2.0.0, < 2.4.16 2.4.16
    composer require sulu/sulu:2.4.16
  • >= 2.5.0, < 2.5.12 2.5.12
    composer require sulu/sulu:2.5.12

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback