Crypt::DSA versions before 1.21 for Perl reused the nonce across signatures, leading to private-key recovery. Crypt::DSA::sign caches the per-signature nonce material in the Key object without ever clearing it. The first sign() on a Key object picks a nonce, and every later sign() on that same object reuses it, producing an identical "r". Keys used to sign more than once with an affected version should be considered compromised.
The Crypt::DSA::sign function stores nonce material (a one-time random parameter required by the DSA algorithm) in the Key object without subsequently cleaning it. On the first call to sign() on a given Key object, a nonce is generated, which is then reused by each subsequent call to sign() on the same object. This results in generating signatures with an identical 'r' value, which is a mathematically sufficient condition for an attacker possessing at least two signatures to recover the private key.
An attacker who obtains two or more DSA signatures generated with the same key using the vulnerable version of the library can mathematically recover the private key. Keys used for signing more than one message using the vulnerable version should be considered compromised.
Update the Crypt::DSA library to version 1.21 or later. All DSA private keys that were used to sign more than one message using the vulnerable version should be considered compromised and immediately revoked and replaced with new key pairs.
Crypt::DSA for Perl in versions before 1.21
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N