CVE-2024-45592: Cross-site Scripting in damienharper/auditor-bundle
Summary
CVE-2024-45592: auditor-bundle vulnerable to Cross-site Scripting because name of entity does not get escaped. Affects damienharper/auditor-bundle versions < 5.2.6. Fixed in 5.2.6. 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 damienharper/auditor-bundle is a Packagist package that provides auditing capabilities for Symfony applications. It allows developers to track changes made to entities and generate audit logs. The vulnerability in this package allows for Cross-site Scripting (XSS) attacks due to the lack of escaping the name of an entity.
Vulnerability Detail
The vulnerability arises from the unescaped entity property, which enables JavaScript injection. The issue lies in the %source_label% in the Twig macro, which is not properly escaped. This allows for the insertion and execution of script tags. An attacker can exploit this vulnerability by creating an author with a full name containing malicious JavaScript code. When the author is deleted and the audit of authors is viewed, the injected script will be executed. This results in persistent XSS, where JavaScript can be injected and executed.
How To Fix
Minimum fixed version
5.2.6
This is the first release that contains the fix.
composer require damienharper/auditor-bundle:5.2.6
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. Updating to the fixed version is the recommended solution.
Conclusion
The damienharper/auditor-bundle package is vulnerable to Cross-site Scripting (XSS) due to the lack of escaping the entity name. This allows for the injection and execution of malicious JavaScript code. Developers should update to version 6.0.0 or later to fix this vulnerability.
See every vulnerability recorded for damienharper/auditor-bundle →
FAQ
damienharper/auditor-bundle is a Packagist package that provides auditing capabilities for Symfony applications. It allows developers to track changes made to entities and generate audit logs.
Cross-site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. This can lead to various attacks, such as stealing sensitive information or performing actions on behalf of the user.
The vulnerability occurs due to the lack of escaping the entity name in the Twig macro used by the package. This allows for the injection and execution of JavaScript code.
The impact of this vulnerability is persistent XSS, where an attacker can inject and execute JavaScript code. This can lead to various malicious actions, such as stealing user information or performing unauthorized actions on behalf of the user.
To fix this vulnerability, update to version 6.0.0 or later of the damienharper/auditor-bundle. This version includes the necessary escaping of the entity name to prevent XSS attacks.