Serious bug discovered in widely used cryptographic software

GnuPG users urged to install latest upgrade immediately

Version 1.9.0 of Libgcrypt, GnuPG's cryptographic library, is impacted by a serious remote code execution (RCE) vulnerability that could allow an attacker to execute arbitrary code on the target machine.

However, the good news is that the developers of Libgcrypt library have already removed the vulnerable version from their download servers and have released Version 1.9.1 that is free from the flaw.

The Libgcrypt is a generic cryptographic library offered as part of GNU Privacy Guard (GnuPG) software suite to provide building blocks for carrying out cryptographic tasks such as encrypting and signing data and communications.

Libgcrypt is shipped with most Linux distributions including Ubuntu and Fedora, although it is not as widely used as other open-source cryptographic libraries such as LibreSSL or OpenSSL.

Researcher Tavis Ormandy of Google's Project Zero says he discovered the bug in Libgcrypt library last month, and found it very easy to exploit.

Ormandy revealed that a heap buffer overflow in Libgcrypt occurs due to a wrong assumption in the block buffer management code.

To trigger the bug, an attacker would just need to send the Libgcrypt library a block of booby-trapped data to decrypt. That tricks the application into executing arbitrary malicious code embedded within the data (shellcode). Ormandy said that "no verification or signature is validated before the vulnerability occurs".

The bug was discovered and reported to Libgcrypt developers last month. The developers immediately took steps and released a patch for the issue within a day.

Libgcrypt author Werner Koch revealed that the flaw was introduced two years ago when version 1.9 of Libgcrypt was being developed.

GnuPG is now urging the users to immediately stop using the vulnerable version and to download the new update as soon as possible.

"Exploiting this bug is simple and thus immediate action for 1.9.0 users is required," Koch noted.

"The 1.9.0 tarballs on our FTP server have been renamed so that scripts won't be able to get this version anymore," he added.