Gpg.fail

(gpg.fail)

183 points | by todsacerdoti 4 hours ago

20 comments

  • oefrha 2 hours ago
    Okay, since there’s so much stuff to digest here and apparently there are issues designated as wontfix by GnuPG maintainers, can someone more in the loop tell us whether using gpg signatures on git commits/tags is vulnerable? And is there any better alternative going forward? Like is signing with SSH keys considered more secure now? I certainly want to get rid of gpg from my life if I can, but I also need to make sure commits/tags bearing my name actually come from me.
    • tptacek 1 hour ago
      One of those WONTFIX's is on an insane vulnerability: you can bitflip known plaintext in a PGP message to switch it into handling compression, allowing attackers to instruct GnuPG packet processing to look back to arbitrary positions in the message, all while suppressing the authentication failure message. GPG's position was: they print, in those circumstances, an error of some sort, and that's enough. It's an attack that reveals plaintext bytes!
    • alphazard 1 hour ago
      It's a fundamentally bad idea to have a single key that applications are supposed to look for in a particular place, and then use to sign things. There is inherent complexity involved in making multi-context key use safe, and it's better to just avoid it architecturally.

      Keys (even quantum safe) are small enough that having one per application is not a problem at all. If an application needs multi-context, they can handle it themselves. If they do it badly, the damage is contained to that application. If someone really wants to make an application that just signs keys for other applications to say "this is John Smith's key for git" and "this is John Smith's key for email" then they could do that. Such an application would not need to concern itself with permissions for other applications calling into it. The user could just copy and paste public keys, or fingerprints when they want to attest to their identity in a specific application.

      The keyring circus (which is how GPG most commonly intrudes into my life) is crazy too. All these applications insist on connecting to some kind of GPG keyring instead of just writing the secrets to the filesystem in their own local storage. The disk is fully encrypted, and applications should be isolated from one another. Nothing is really being accomplished by requiring the complexity of yet another program to "extra encrypt" things before writing them to disk.

      I'm sure these bad ideas come from the busy work invented in corporate "security" circles, which invent complexity to keep people employed without any regard for an actual threat model.

      • akerl_ 32 minutes ago
        > The disk is fully encrypted, and applications should be isolated from one another.

        For most apps on non-mobile devices, there isn't filesystem isolation between apps. Disk/device-level encryption solves for a totally different threat model; Apple/Microsoft/Google all ship encrypted storage for secrets (Keychain, Credential Manager, etc), because restricting key material access within the OS has merit.

        > I'm sure these bad ideas come from the busy work invented in corporate "security" circles, which invent complexity to keep people employed without any regard for an actual threat model.

        Basically everything in PGP/GPG predates the existence of "corporate security circles".

    • 65a 37 minutes ago
      > I certainly want to get rid of gpg from my life if I can

      I see this sentiment a lot, but you later hint at the problem. Any "replacement" needs to solve for secure key distribution. Signing isn't hard, you can use a lot of different things other than gpg to sign something with a key securely. If that part of gpg is broken, it's a bug, it can/should be fixed.

      The real challenge is distributing the key so someone else can verify the signature, and almost every way to do that is fundamentally flawed, introduces a risk of operational errors or is annoying (web of trust, trust on first use, central authority, in-person, etc). I'm not convinced the right answer here is "invent a new one and the ecosystem around it".

      • woodruffw 33 minutes ago
        A lot of people are using PGP for things that don’t require any kind of key distribution. If you’re just using it to encrypt files (even between pointwise parties), you can probably just switch to age.

        (We’re also long past the point where key distribution has been a significant component of the PGP ecosystem. The PGP web of trust and original key servers have been dead and buried for years.)

      • akerl_ 11 minutes ago
        It's not like GPG solves for secure key distribution. GPG keyservers are a mess, and you can't trust their contents anyways unless you have an out of band way to validate the public key. Basically nobody is using web-of-trust for this in the way that GPG envisioned.

        This is why basically every modern usage of GPG either doesn't rely on key distribution (because you already know what key you want to trust via a pre-established channel) or devolves to the other party serving up their pubkey over HTTPS on their website.

      • kaoD 22 minutes ago
        This is not the first time I see "secure key distribution" mentioned in HN+(GPG alternatives) context and I'm a bit puzzled.

        What do you mean? Web of Trust? Keyservers? A combination of both? Under what use case?

        • kpil 7 minutes ago
          I'm assuming they mean the old way of signing each others signatures.

          As a practical implementation of "six degrees of Kevin Bacon", you could get an organic trust chain to random people.

          Or at least, more realistically, to few nerds. I think I signed 3-4 peoples signatures.

          The process had - as they say - a low WAF.

    • larusso 2 hours ago
      I did the switch this year after getting yet another personal computer. I have 4 in total (work laptop, personal sofa laptop, Mac Mini, Linux Tower). I used Yubi keys with gpg and resident ssh keys. All is fine but the configuration needed to get it too work on all the machines. I also tend to forget the finer details and have to relearn the skills of fetching the public keys into the keychain etc. I got rid of this all by moving to 1Password ssh agent and git ssh signing. Removes a lot of headaches from my ssh setup. I still have the yubi key(s) though as a 2nd factor for certain web services. And the gpg agent is still running but only as a fallback. I will turn this off next year.
      • hirako2000 36 minutes ago
        How is 1password safer than the local keychain?
        • larusso 18 minutes ago
          The keys never leave the 1Password store. So you don’t have the keys on the local file system. That and that these keys are shared over the cloud was the seller for me. I guess security wise it’s a bit of a downgrade compared to resident keys. But the agent support agent forwarding etc which wasn’t really working with yubi ssh resident keys. Also worth mentioning that I use 1Password. Bitwarden has a similar feature as far as I know. For the ones who want to self host etc might be the even better solution.
          • akerl_ 14 minutes ago
            > The keys never leave the 1Password store. So you don’t have the keys on the local file system.

            Keychain and 1Password are doing variants of the same thing here: both store an encrypted vault and then give you credentials by decrypting the contents of that vault.

      • hk1337 2 hours ago
        > 1Password ssh agent and git ssh signing

        I’m still working through how to use this but I have it basically setup and it’s great!

    • xorcist 2 hours ago
      These are not vulnerabilities in the "remote exploit" sense. They should be taken seriously, you should be careful not to run local software on untrusted data, and GPG should probably do more to protect users from shooting themselves in the foot, but the worst thing you could do is panic and throw out a process your partners and colleagues trust. There is nothing here that will disturb your workflow signing commits or apt-get install-ing from your distribution.

      If you use crypographic command line tools to verify data sent to you, be mindful on what you are doing and make sure to understand the attacks presented here. One of the slides is titled "should we even use command line tools" and yes, we should because the alternative is worse, but we must be diligent in treating all untrusted data as adversarial.

      • akerl_ 1 hour ago
        A huge part of GPG’s purported use case is getting a signed/encrypted/both blob from somebody and using GPG to confirm it’s authentic. This is true for packages you download and for commits with signatures.

        Handling untrusted input is core to that.

        • xorcist 1 hour ago
          It is, and other software handling untrusted data should also treat it as adversarial. For example, your package tool should probably not output raw package metadata to the terminal.
          • akerl_ 1 hour ago
            I think you’re missing the forest for the trees.
  • smallerize 3 hours ago
    Seems to be down? Here's a thread with a summary of exploits presented in the talk: https://bsky.app/profile/filippo.abyssdomain.expert/post/3ma...
    • orblivion 3 hours ago
      Maybe the site is overloaded. But as for the "brb, were on it!!!!" - this page had the live stream of the talk when it was happening. Hopefully they'll replace it with the recording when media.ccc.de posts it, which should be within a couple hours.
  • wkat4242 31 minutes ago
    I don't mind gpg. I still use it a lot especially with the private keys on openpgp smartcards or yubikeys.

    It's a pretty great ecosystem, most hardware smartcards are surrounded by a lot of black magic and secret handshakes and stuff like pkcs#11 and opensc/openct are much much harder to configure.

    I use it for many things but not for email. Encrypted backups, password manager, ssh keys. For some there are other hardware options like fido2 but not for all usecases and not the same one for each usecase. So I expect to be using gpg for a long time to come.

  • derleyici 3 hours ago
    Werner Koch from GnuPG recently (2025-12-26) posted this on their blog: https://www.gnupg.org/blog/20251226-cleartext-signatures.htm...

    Archive link: https://web.archive.org/web/20251227174414/https://www.gnupg...

    • woodruffw 3 hours ago
      This feels pretty unsatisfying: something that’s been “considered harmful” for three decades should be deprecated and then removed in a responsible ecosystem.

      (PGP/GPG are of course hamstrung by their own decision to be a Swiss Army knife/only loosely coupled to the secure operation itself. So the even more responsible thing to do is to discard them for purposes that they can’t offer security properties for, which is the vast majority of things they get used for.)

      • LtWorf 3 hours ago
        Well python discarded signing entirely so that's one way to solve it :)
        • woodruffw 2 hours ago
          Both CPython and distributions on PyPI are more effectively signed than they were before.

          (I think you already know this, but want to relitigate something that’s not meaningfully controversial in Python.)

          • LtWorf 1 hour ago
            Being signed by some entity which is not the author is hardly more effective.

            (I think you already know this as well)

            • woodruffw 1 hour ago
              It is, in fact, signed by the author. It's just a PKI, so you intermediate trust in the author through an authority.

              This is exactly analogous to the Web PKI, where you trust CAs to identify individual websites, but the websites themselves control their keypairs. The CA's presence intermediates the trust but does not somehow imply that the CA itself does the signing for TLS traffic.

              • LtWorf 9 minutes ago
                Not really, uploading via trusted publishers I don't own any private key, as you probably know having implemented it yourself I presume.
      • cpach 2 hours ago
        GPG is indeed deprecated.

        Most people have never heard of it and never used it.

        • woodruffw 2 hours ago
          Can you provide a source this? To my understanding, the GnuPG project (and by extension PGP as an ecosystem) considers itself very much alive, even though practically speaking it’s effectively moribund and irrelevant.

          (So I agree that it’s de facto dead, but that’s not the same thing as formal deprecation. The latter is what you do explicitly to responsibly move people away from something that’s not suitable for use anymore.)

          • cpach 1 hour ago
            Ah. I meant in the de facto sense.
        • IshKebab 9 minutes ago
          I would be very much surprised if GPG has ever really achieved anything other than allowing crypto nerds to proclaim that things were encrypted or signed. Good for them I guess, but not of any practical importance, unlike SSH, TLS, 7Zip encryption, etc.
    • hendi_ 2 hours ago
      [flagged]
      • derleyici 1 hour ago
        i wouldn't normally reply to drive-by corrections, but this is wrong.

        it's the GnuPG blog on gnupg.org with multiple authors.

        this is a post by Werner Koch, not his blog.

    • stackghost 50 minutes ago
      It must be tough to be Werner Koch, and have poured so much time and energy into GPG only to have it demonstrated again and again that you're incompetent, and GPG is unfixably broken at a fundamental level.
  • rurban 4 hours ago
    Zero-days from the CCC talk https://fahrplan.events.ccc.de/congress/2025/fahrplan/event/...

    But trust in Werner Koch is gone. Wontfix??

    • corndoge 4 hours ago
      I am curious what you mean by "trust in Werner Koch is gone". Can you elaborate?
      • karambahh 3 hours ago
        OP is complaining about GPG team rejecting issues with "wontfix" statuses.
    • cpach 3 hours ago
      To be frank, at this point, GPG has been a lost cause for basically decades.

      People who are serious about security use newer, better tools that replace GPG. But keep in mind, there’s no “one ring to rule them all”.

      • perching_aix 1 hour ago
        What are those better tools? I've been broadly looking into this space, but never ventured too deep.
        • ameliaquining 1 hour ago
          • p2detar 33 minutes ago
            > Encrypting email

            > Don't.

            https://www.latacora.com/blog/2019/07/16/the-pgp-problem/#en...

            I’m not sure I completely agree here. For private use, this seems fine. However, this isn’t how email encryption is typically implemented in an enterprise environment. It’s usually handled at the mail gateway rather than on a per-user basis. Enterprises also ensure that the receiving side supports email encryption as well.

            edit: formatting

            • tptacek 12 minutes ago
              Your mail either needs to be encrypted reliably against real adversaries or it doesn't. A private emailing circle doesn't change that. If the idea here is, a private group of friends can just agree never to put anything in their subjects, or to accidentally send unencrypted replies, I'll just say I ran just such a private circle at Matasano, where we used encrypted mail to communicate about security assessment projects, and unencrypted replies happened.
        • singpolyma3 1 hour ago
          Sequoia for example has been doing a great job and implements the latest version of the standard which brings a lot of cryptography up to date
          • akerl_ 30 minutes ago
            The latest version of a bad standard is still bad.

            This page is a pretty direct indicator that GPG's foundation is fundamentally broken: you're not going to get to a good outcome trying to renovate the 2nd story.

            • singpolyma3 9 minutes ago
              That's just not true. Nothing in this page is a problem with the standard and everything in this page is the outdated parts of the old standard.
              • akerl_ 4 minutes ago
                So then why do a bunch of these affect Sequoia as well?
          • perching_aix 1 hour ago
            I'm yet to finish watching the talk, but it starts with them confirming the demo fraudulent .iso with sequoia also (they call it out by name), so this really makes me think. :)
            • tptacek 1 hour ago
              Sequioa hasn't fixed the attack from the beginning of the talk, the one where they convert between cleartext and full signature formats and inject unsigned bytes into the output because of the confusion.
        • arccy 1 hour ago
          ssh or minisign for signing age for file encryption
  • SSLy 2 hours ago
  • elric 3 hours ago
    This is depressing.

    From what I can piece together while the site is down, it seems like they've uncovered 14 exploitable vulnerabilities in GnuPG, of which most remain unpatched. Some of those are apparently met by refusal to patch by the maintainer. Maybe there are good reasons for this refusal, maybe someone else can chime in on that?

    Is this another case of XKCD-2347? Or is there something else going on? Pretty much every Linux distro depends on PGP being pretty secure. Surely IBM & co have a couple of spare developers or spare cash to contribute?

    • akerl_ 1 hour ago
      > Surely IBM & co have a couple of spare developers or spare cash to contribute?

      A major part of the problem is that GPG’s issues aren’t cash or developer time. It’s fundamentally a bad design for cryptographic usage. It’s so busy trying to be a generic Swiss Army knife for every possible user or use case that it’s basically made of developer and user footguns.

      The way you secure this is by moving to alternative, purpose-built tools. Signal/WhatsApp for messaging, age for file encryption, minisign for signatures, etc.

    • ameliaquining 1 hour ago
      If by "pretty much every Linux distro depends on PGP being pretty secure" you're referring to its use to sign packages in Linux package managers, it's worth noting that they use PGP in fairly narrowly constrained ways; in particular, the data is often already trusted because it was downloaded over HTTPS from a trusted server (making PGP kind of redundant in some ways). So most PGP vulnerabilities don't affect them.

      If there were a PGP vulnerability that actually made it possible to push unauthorized updates to RHEL or Fedora systems, then probably IBM would care, but if they concluded that PGP's security problems were a serious threat then I suspect they'd be more likely to start a migration away from PGP than to start investing in making PGP secure; the former seems more tractable and would have maintainability benefits besides.

      • viraptor 14 minutes ago
        > already trusted because it was downloaded over HTTPS from a trusted server (making PGP kind of redundant in some ways)

        That's mostly incorrect in both counts. One is that lots of mirrors are still http-only or http default https://launchpad.net/ubuntu/+archivemirrors

        The other is that if you get access to one of the mirrors and replace a package, it's the signature that stops you. Https is only relevant for mitm attacks.

        > they'd be more likely to start a migration away from PGP

        The discussions started ages ago:

        Debian https://wiki.debian.org/Teams/Apt/Spec/AptSign

        Fedora https://lists.fedoraproject.org/archives/list/packaging@list...

      • zzo38computer 5 minutes ago
        Downloading over HTTPS does not help with that (although it can prevent spies from seeing what files you are downloading) unless you can independently verify the server's keys. The certificate is intended to do this but the way that standard certificate authorities work will only verify the domain name, and has some other limitations. However, the verificiation of TLS rather than only using signed files also means that if you are trying to check for new versions deliberately, that they will not lie and say there are no new versions; and it ensures that if the server supports searching, that someone will not override the searches and give you the wrong package deliberately, etc. If you only need a specific version and you already know what that one is, then using a cryptographic hash will be a better way to verify packages, although that only applies for one specific version of one specific package. So, using an encrypted protocol (HTTPS or any other one) alone will not help, although it will help in combination with other things; you will need to do other things as well, to improve the security.
    • collinfunk 3 hours ago
      Haven't read it since it is down, but based on other comments, it seems to be an issue with cleartext signatures.

      I haven't seen those outside of old mailing list archives. Everyone uses detached signatures nowadays, e.g. PGP/MIME for emails.

      • bytehamster 3 hours ago
        If I understood their first demo correctly, they verified a fedora iso with a detached signature. The booted iso then printed "hello 39c3". https://streaming.media.ccc.de/39c3/relive/1854
        • unscaled 2 hours ago
          It was a cleartext signature, not a detached signature.

          Edit: even better. It was both. There is a signature type confusion attack going on here. I still didn't watch the entire thing, but it seems that unlike gpg, they do have to specify --cleartext explicitly for Sequoia, so there is no confusion going on that case.

  • singpolyma3 3 hours ago
    AFAICT this is GnuPG specific and not OpenPGP related? Since GnuPG has pulled out of standards compliance anyway there are many better options. Sequoia chameleon even has drop in tooling for most workflows.
    • rurban 3 hours ago
      They presented critical parser flaws in all major PGP implementations, not just GNU PGP, also sequoia, minisign and age. But gpg made the worst impression to us. wontfix
      • akerl_ 2 hours ago
        Since when are age or minisign PGP implementations?
        • some_furry 18 minutes ago
          The talk title includes "& Friends", for what it's worth.
    • somethrowa123 3 hours ago
      no, some clearsig issues are a problem in openpgp standard itself
    • Analemma_ 51 minutes ago
      The specific bugs are with GPG, but a lot of the reason they can exist to begin with is PGP’s convoluted architecture which, IMO, makes these sorts of issues inevitable. I think they are effectively protocol bugs.
  • IAmLiterallyAB 1 hour ago
  • tptacek 2 hours ago
    A thru-line of some of the gnarliest vulnerabilities here is PGP's insane packet system, where a PGP message is a practically arbitrary stream of packets, some control and some data, with totally incoherent cryptographic bindings. It's like something in between XMLDSIG (which pulls cryptographic control data out of random places in XML messages according to attacker-controlled tags) and SSL2 (with no coherent authentication of the complete handshake).

    The attack on detached signatures (attack #1) happens because GnuPG needs to run a complicated state machine that can put processing into multiple different modes, among them three different styles of message signature. In GPG, that whole state machine apparently collapses down to a binary check of "did we see any data so that we'd need to verify a signature?", and you can selectively flip that predicate back and forth by shoving different packets into message stream, even if you've already sent data that needs to be verified.

    The malleability bug (attack #4) is particularly slick. Again, it's an incoherent state machine issue. GPG can "fail" to process a packet because it's cryptographically invalid. But it can also fail because the message framing itself is corrupted. Those latter non-cryptographic failures are handled by aborting the processing of the message, putting GPG into an unexpected state where it's handling an error and "forgetting" to check the message authenticator. You can CBC-bitflip known headers to force GPG into processing DEFLATE compression, and mangle the message such that handling the message prints the plaintext in its output.

    The formfeed bug (#3) is downright weird. GnuPG has special handling for `\f`; if it occurs at the end of a line, you can inject arbitrary unsigned data, because of GnuPG's handling of line truncation. Why is this even a feature?

    Some of these attacks look situational, but that's deceptive, because PGP is (especially in older jankier systems) used as an encryption backend for applications --- Mallory getting Alice to sign or encrypt something on her behalf is an extremely realistic threat model (it's the same threat model as most cryptographic attacks on secure cookies: the app automatically signs stuff for users).

    There is no reason for a message encryption system to have this kind of complexity. It's a deep architectural flaw in PGP. You want extremely simple, orthogonal features in the format, ideally treating everything as clearly length-delimited opaque binary blobs. Instead you get a Weird Machine, and talks like this one.

    Amazing work.

    • oskarw85 1 hour ago
      Thank you for this excellent explanation!
  • somethrowa123 2 hours ago
    the writeup is now available and the recording lives at https://media.ccc.de/v/39c3-to-sign-or-not-to-sign-practical...
  • 1317 52 minutes ago
    [video]
  • GaryBluto 4 hours ago
    > brb, were on it!!!!
  • selfbottle 2 hours ago
    writeups are online :))
  • clacker-o-matic 2 hours ago
    its back up!
  • WesolyKubeczek 4 hours ago
    gpg.fail fail: "brb, we're on it!"
  • _haxx0rz 3 hours ago
    hug of death?
    • rurban 3 hours ago
      Nope. Not yet enabled. It was submitted to HN right after the talk where they promised to make it public "really soon" after the talk. We all saw the talk live or on the stream
  • cindyllm 1 hour ago
    [dead]
  • ekjhgkejhgk 2 hours ago
    [flagged]