oCERT Advisories

#2009-004 AjaxTerm session id collision


AjaxTerm, an open source web based terminal, uses a form of random session id generation which can lead to remote session hijacking.

The ajaxterm.js script allocates session ids on the client side using the following method:

var sid=""+Math.round(Math.random()*1000000000);

The javascript random function used in combination with round does not provide sufficient entropy for a unique session id, as the session id is the only unique identifier for the user session it is possible for an attacker to brute force the space of possible id values and attach an existing connection.

This vulnerability also allows Denial Of Service attacks as it is possible to exhaust the available session ids when performing a brute force attack and, depending on the configured AjaxTerm child command, system resources.

Affected version:

AjaxTerm <= 0.10

Fixed version:

Unfortunately oCERT has been unable to get feedback from AjaxTerm maintainers and the package seems unmaintained, it's therefore suggested to avoid AjaxTerm usage on production or any environment where strong security is needed.

Credit: initial vulnerability report provided by Michael Greb <mgreb [at] linode [dot] com>.

CVE: CVE-2009-1629


2009-03-12: vulnerability report received
2009-03-12: contacted AjaxTerm maintainer
2009-04-18: oCERT contacts various vendors security team seeking for developers familiar with AjaxTerm
2009-04-28: due to lack of feedback oCERT asks reporter to disclose the issue
2009-04-29: reporter agrees to disclosure
2009-05-11: advisory release
2009-05-14: assigned CVE



© oCERT.org - Some rights reserved.