# CVE-2014-4301: Ajenti cross-site scripting in error handler

Source: https://junglewise.ai/threats/cve-2014-4301-ajenti-cross-site-scripting-in-error-handler  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2014-06-18. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2014-4301 · Severity: low · CVSS 3.1 · Published 2014-06-18

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.

Technologies: [ajenti (PyPI)](https://junglewise.ai/threats/technologies/pypi-ajenti). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2014-4301 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2014-4301 being exploited in the wild.

**How severe is CVE-2014-4301?** Low severity, with a CVSS score of 3.1, published 18 June 2014.

**Which products and versions are affected?** ajenti (PyPI) ECOSYSTEM:introduced=0,fixed=1.2.21.7, GIT:introduced=0,fixed=d3fc5eb142ff16d55d158afb050af18d5ff09120|ECOSYSTEM:introduced=0,fixed=1.2.21.7.

**Is there a fix for CVE-2014-4301?** Yes. ajenti (PyPI): upgrade to 1.2.21.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2014-4301 attacked?** It is attacked over the network.

**Am I affected by CVE-2014-4301?** Check whether you run ajenti (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- ajenti (PyPI): upgrade to 1.2.21.7 or later

  ```sh
  pip install "ajenti>=1.2.21.7"
  ```


## 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

## Identifiers

- CVE-2014-4301
- GHSA-2ch8-f849-pjg3
- PYSEC-2014-99

## Timeline

- 2014-06-18: disclosed
- 1.2.21.7: patched

## References

- [https://github.com/Eugeny/ajenti/commit/d3fc5eb142ff16d55d158afb050af18d5ff09120](https://github.com/Eugeny/ajenti/commit/d3fc5eb142ff16d55d158afb050af18d5ff09120)

## Related threats

- [PYSEC-2018-107 - ajenticp (aka Ajenti Docker control panel) for Ajenti through v1.2.23.13 has XSS via a filename that is mishandled in File Manager.](https://junglewise.ai/threats/cve-2018-18548-ajenti-cross-site-scripting-via-filename)
- [Ajenti Cross-site scripting (XSS) vulnerability](https://junglewise.ai/threats/cve-2014-2260-ajenti-cross-site-scripting-xss-vulnerability)
