Cross-Site Scripting Vulnerability in php-getid3: Remote Code Injection Risk
Summary
DEBIAN-CVE-2021-40926: Cross-site scripting (XSS) vulnerability in demos/demo.mysqli.php in getID3 1.X and v2.0.0-beta allows remote attackers to inject arbitrary web script or HTML via the showtagfiles parameter. Affects php-getid3 versions < 1.9.21+dfsg-1. Fixed in 1.9.21+dfsg-1. 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
php-getid3 is an open-source PHP library designed for extracting information from various audio and video file formats. It provides functionalities such as reading metadata, analyzing file types, and retrieving tags. However, certain versions of this package are vulnerable to a cross-site scripting (XSS) issue, which can allow attackers to inject malicious scripts into web applications that utilize this library.
Vulnerability Detail
The vulnerability arises from improper handling of user input in the demos/demo.mysqli.php file of getID3 versions 1.X and v2.0.0-beta. Specifically, the 'showtagfiles' parameter is susceptible to XSS attacks, enabling remote attackers to inject arbitrary web scripts or HTML. This could lead to unauthorized actions being performed on behalf of users, data theft, or the spread of malware.
How To Fix
Minimum fixed version
1.9.21+dfsg-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade php-getid3
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary measure, users can sanitize the input received from the 'showtagfiles' parameter to prevent the execution of any injected scripts. This can be done by implementing input validation or escaping special characters in the input before processing it.
Conclusion
The php-getid3 package has a critical XSS vulnerability that can be exploited by attackers to inject malicious scripts. Users are advised to update to the latest patched version to mitigate risks. Implementing input validation can serve as a temporary workaround until the update is applied.
See every vulnerability recorded for php-getid3 →
FAQ
The vulnerability affects all versions of php-getid3 in the 1.X series and v2.0.0-beta.
You can use the Vulert playground at Vulert Scanner to check if your application is impacted by this vulnerability without needing to sign up.
If exploited, this vulnerability can allow attackers to execute malicious scripts, leading to data theft, unauthorized actions, or the spread of malware.
Yes, you can implement input validation and sanitize user inputs to prevent the execution of malicious scripts as a temporary workaround.
You can visit Vulert at https://vulert.com, which monitors and alerts for open-source vulnerabilities in software using a manifest file.
References
Related vulnerabilities
Recent vulnerabilities recorded for php-getid3.