Executive brief
Ajenti is a web-based system administration and configuration tool. The application fails to sanitize error messages displayed in traceback pages, allowing attackers to inject malicious JavaScript or HTML that executes in the context of other users' browsers. This could lead to session hijacking, credential theft, or defacement of the administration interface.
Technical details
The vulnerability is a reflected cross-site scripting (XSS) flaw in the respond_error function in ajenti/routing.py. The respond_error function generates error pages (specifically traceback pages) but fails to HTML-escape the PATH_INFO parameter before inserting it into the generated HTML response. An attacker can craft a malicious URL with JavaScript in the PATH_INFO parameter (targeting resources.js or resources.css paths under ajenti:static/) which will be executed in the browser of any user who clicks the link. The fix, applied in version 1.2.21.7, implements cgi.escape() to properly sanitize the stack trace output before rendering it in the HTML response.
Affected products
- Eugene Pankov Ajenti before 1.2.21.7
Timeline
- 2014-06-18: disclosed
- 1.2.21.7: patched