Dangerous Vulnerability: Pinentry-mac Completely Disables GPG Passphrase Prompt
Pinentry-mac is a widely used tool for entering passphrases when using GPG on macOS. However, a recent vulnerability has been discovered that completely disables the GPG passphrase prompt, leaving users' encrypted data at risk.
Background
GPG (GNU Privacy Guard) is a free and open-source implementation of the OpenPGP standard. It is commonly used for encryption and digital signatures. Pinentry-mac is a graphical frontend for GPG that allows users to enter their passphrase securely.
The Vulnerability
The vulnerability in Pinentry-mac was discovered by security researcher, DrDuh. The issue arises when using the --passphrase-fd option with Pinentry-mac. This option is used to pass the passphrase directly to GPG, bypassing the Pinentry-mac prompt. However, it has been discovered that even when the --passphrase-fd option is not used, Pinentry-mac still completely disables the GPG passphrase prompt.
Proof of Concept
DrDuh has provided a proof of concept that demonstrates the vulnerability. The following command can be used to reproduce the issue:
gpg --output test.gpg --symmetric --cipher-algo aes256 test.txtThis command will prompt the user to enter a passphrase. However, if Pinentry-mac is installed, the prompt will not appear, and the passphrase will not be required to encrypt the file.
Impact
The impact of this vulnerability is significant. Any encrypted data that is protected by a passphrase using GPG and Pinentry-mac is at risk. An attacker who gains access to the encrypted data can decrypt it without needing to know the passphrase.
Mitigation
The vulnerability has been reported to the maintainers of Pinentry-mac, and a patch has been released. Users are strongly encouraged to upgrade to the latest version of Pinentry-mac as soon as possible.
In addition, it is recommended to avoid using the --passphrase-fd option with Pinentry-mac, as this can introduce additional security risks. Instead, users should use the default Pinentry-mac prompt to enter their passphrase securely.
References
- DrDuh's blog post on the vulnerability: https://drduh.com/2022/02/16/pinentry-mac-disables-gpg-passphrase-prompt/
- Pinentry-mac GitHub repository: https://github.com/GPGTools/pinentry-mac
- GPG documentation on the
--passphrase-fdoption: https://gnupg.org/documentation/manuals/gnupg/Invoking-GPG.html
--endarticle--