Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 15 Jun 2019 17:09:53 +0200
From: Raphael Geissert <>
To: Open Source Security <>
Subject: Apache::Session's use of md5 and more


I just stumbled upon Apache::Session's Generate::MD5 module, which
appears to be used to generate the session ids for cookies and the

Not only does it use MD5, but its source of entropy is weak and does
two rounds of hashing. From the source code[1]:

    $session->{data}->{_session_id} =
        substr(Digest::MD5::md5_hex(Digest::MD5::md5_hex(time(). {}.
rand(). $$)), 0, $length);

(where $length is 32 by default)

Am I missing something, or has this code actually been in use for ages
and gone unnoticed ? I couldn't find any CVE for this.

So far I found this reference, but only mentions the use of MD5 as a weakness:

>From a quick look at the reverse dependencies of the Debian package,
there are some users of Apache::Session:
* RequestTracker (RT) : from a quick look at the session id in the
cookie set by I'd say it does use Generate::MD5
* Torrus: no idea if the Generate::MD5 module is used
* LemonLdap::NG : they replaced Generate::MD5 by a similar code using
SHA256, but still using two rounds of hashing

CC'ing BestPractical. Will open an issue on LemonLdap::NG's gitlab.


Raphael Geissert - Debian Developer

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.