Reflected XSS Vulnerability in phpLDAPadmin: Execute Arbitrary JavaScript via 'element' Parameter
Summary
DEBIAN-CVE-2024-9101: A reflected cross-site scripting (XSS) vulnerability in the 'Entry Chooser' of phpLDAPadmin (version 1.2.1 through the latest version, 1.2.6.7) allows attackers to execute arbitrary JavaScript in the user's browser via t... Affects phpldapadmin versions < 1.2.6.7-4. Fixed in 1.2.6.7-4. 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
phpLDAPadmin is a web-based application used for managing LDAP directories. It provides a user-friendly interface for administrators to perform various tasks such as adding, modifying, and deleting entries in an LDAP directory. The application is widely used due to its ease of use and powerful features. However, it has been identified to have a reflected cross-site scripting (XSS) vulnerability that affects versions 1.2.1 through 1.2.6.7, which can allow attackers to execute arbitrary JavaScript in the user's browser under specific conditions.
Vulnerability Detail
The vulnerability arises from the 'Entry Chooser' feature in phpLDAPadmin, where the 'element' parameter is unsafely passed to the JavaScript 'eval' function. This can lead to reflected XSS attacks, allowing attackers to inject and execute malicious scripts in the context of the user's session. The exploitation of this vulnerability is contingent upon specific conditions, particularly that the 'opener' property is correctly set, which can limit the attack surface but does not eliminate the risk.
How To Fix
Minimum fixed version
1.2.6.7-4
This is the first release that contains the fix.
sudo apt-get install --only-upgrade phpldapadmin
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users can avoid using the 'Entry Chooser' feature until the package is updated. Additionally, implementing Content Security Policy (CSP) headers can help mitigate the risk of XSS attacks by restricting the sources from which scripts can be executed.
Conclusion
The reflected XSS vulnerability in phpLDAPadmin poses a significant risk to users, allowing attackers to execute arbitrary JavaScript. It is crucial to update to the patched version to mitigate this risk. Users should also consider implementing workarounds and monitoring tools like Vulert for ongoing security.
See every vulnerability recorded for phpldapadmin →
FAQ
Reflected XSS is a type of vulnerability where an attacker can inject malicious scripts into a web application, which are then reflected off a web server and executed in the user's browser.
If you are using phpLDAPadmin version 1.2.1 through 1.2.6.7, your installation is vulnerable to this XSS issue.
An attacker could execute arbitrary JavaScript in the user's browser, potentially leading to data theft, session hijacking, or other malicious actions.
Yes, tools like Vulert can monitor your application for open-source vulnerabilities in real-time using just a manifest file like package-lock.json.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
References
Related vulnerabilities
Recent vulnerabilities recorded for phpldapadmin.