CVE-2024-28234: Contao/comments-bundle - Insufficient BBCode sanitizer
Summary
CVE-2024-28234: Contao: Insufficient BBCode sanitizer. Affects contao/comments-bundle across 2 version ranges.
>= 2.0.0, < 4.13.40
>= 5.0.0-RC1, < 5.3.4
Fixed in 4.13.40 or 5.3.4, depending on the release line you run. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The Contao/comments-bundle package is a part of the Contao CMS ecosystem and is responsible for managing comments on Contao websites. It provides functionality for users to leave comments on various content types. The package supports BBCode formatting, allowing users to add formatting and styling to their comments.
Vulnerability Detail
The vulnerability in the Contao/comments-bundle package allows users to inject CSS styles when BBCode is enabled for comments. This can lead to potential security issues as malicious users can exploit this to execute arbitrary code or perform cross-site scripting (XSS) attacks. The lack of proper sanitization of BBCode inputs allows the injection of CSS styles, which can affect the appearance and behavior of the website.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
>= 2.0.0, < 4.13.404.13.40composer require contao/comments-bundle:4.13.40 -
>= 5.0.0-RC1, < 5.3.45.3.4composer require contao/comments-bundle:5.3.4
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
If updating the package is not immediately feasible, a temporary workaround is to disable BBCode for comments. By disabling BBCode, the ability to inject CSS styles is removed, mitigating the risk of exploitation. However, this workaround may impact the user experience by limiting the formatting options available for comments.
Conclusion
The vulnerability in the Contao/comments-bundle package allows users to inject CSS styles when BBCode is enabled for comments. This can lead to potential security risks, including the execution of arbitrary code or cross-site scripting (XSS) attacks. To mitigate this vulnerability, it is recommended to update the package to the latest patched versions. If immediate updating is not possible, disabling BBCode for comments can serve as a temporary workaround. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for contao/comments-bundle →
FAQ
The vulnerability allows users to inject CSS styles when BBCode is enabled for comments. This can lead to potential security risks, including the execution of arbitrary code or cross-site scripting (XSS) attacks.
To fix this vulnerability, update the Contao/comments-bundle package to version 4.13.40 or 5.3.4. These versions include the necessary patches to properly sanitize BBCode inputs and prevent the injection of CSS styles.
Yes, a temporary workaround is to disable BBCode for comments. This removes the ability to inject CSS styles and mitigates the risk of exploitation. However, this may impact the formatting options available for comments.
There are no known public exploits of this vulnerability at the time of this advisory. However, it is important to address the vulnerability promptly to prevent potential security risks.
For more information about this vulnerability, you can refer to the Contao security advisory at https://contao.org/en/security-advisories/insufficient-bbcode-sanitization.
References
Related vulnerabilities
Recent vulnerabilities recorded for contao/comments-bundle.