Crypt::CBC versions between 1.21 and 3.04 for Perl may use the rand() function as the default source of entropy, which is not cryptographically secure, for cryptographic functions. This issue affects operating systems where "/dev/urandom'" is unavailable. In that case, Crypt::CBC will fallback to use the insecure rand() function.
When taint mode is turned on and user is using a tainted key, explicitly check tainting of key in order to avoid "cryptic" failure messages from some crypt modules.