HN.zip

RCE in Gnupg

196 points by - 70 comments
[3 hidden]5 mins ago
Reportedly fixed by Red Hat 5 years ago based on the output from conventional tools, but missed by upstream: https://gitlab.com/redhat/centos-stream/rpms/gpgme/-/blob/c9...
[3 hidden]5 mins ago
[3 hidden]5 mins ago
How is this even possible?

"when it was noticed by a Coverity scan:"

It was found by static analysis FIVE years ago, but never re-found? That is really odd. I thought people were running every kind of commercial scanning tool on OSS for free most of the time.

[3 hidden]5 mins ago
Hurray for endless distro forks
[3 hidden]5 mins ago
Rh is kind of the canonical distro, though, as much as there is such a thing. I’m surprised this was never upstreamed.
[3 hidden]5 mins ago
Used to be long ago. Maybe still is somewhat for business use. Debian or Ubuntu has been the most standard distro for many years now.
[3 hidden]5 mins ago
Depends on your circles...
[3 hidden]5 mins ago
RH has a lot of sway but calling it canonical would be a step too far in my opinion.
[3 hidden]5 mins ago
Debian is the canonical distro.

Ubuntu is the Canonical distro, but that's unrelated.

[3 hidden]5 mins ago
No Canonical makes Ubuntu. Jokes aside, Ubuntu and Debian are the most used distros by far.
[3 hidden]5 mins ago
In my personal experience, I think both of you are right in different bubbles (for lack of a better word). If you worked in commercial unix-like tech systems since the early 2000s (meaning your company/business was tech focused), you would consider RH to be the canonical distro. There is a reason all the newer distros marketed towards commercial use (Alma, Rocky, Cent, Core, Amazon, Azure) are all Fedora/RH derivatives.

If you have been mainly OSS or used unix-system in a non-tech business, then you would consider Debian/Ubuntu to be the more canonical distros.

[3 hidden]5 mins ago
In HEP and academic cluster environments EL is standard. I only use Debian on embedded Linux.
[3 hidden]5 mins ago
It's unfortunate because they're definitely not the best, even at the reasons Ubuntu is often cited for being "better."

IMO, RH is just better at security, integration, and much much more.

[3 hidden]5 mins ago
Yeah I use Ubuntu and Fedora and the only thing I don't like about my Fedora desktop is that more desktop software is only available for Ubuntu/Debian rather than Fedora. Probably only simply because Ubuntu is more popular. (I have used alien in the past to some success in this regard to get software running on Fedora that was only built for Ubuntu.)

More on alien:

> alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages. [1]

[1]: (https://manpages.ubuntu.com/manpages/bionic/man1/alien.1p.ht...)

[3 hidden]5 mins ago
It's becoming clear that humans have no business writing C/C++ without Rust-level tooling around it to prevent these things.
[3 hidden]5 mins ago

       This vulnerability was discovered by Johan Carlsson and we were informed by GitLab on 2026-11-12.
       Initially we set 2026-11-25 for a coordinated disclosure;
       due to the new Ruby2Shell bug GitLab had to update earlier
       and thus we also disclosed the GPGME bug on 2026-11-20.
I guess pretty important for GitLab since it supports signed commits, code execution in that path is pretty bad.

You can find the GitLab Omnibus related patch here: https://gitlab.com/gitlab-org/omnibus-gitlab/-/commit/279ac3...

[3 hidden]5 mins ago
It's a double free bug, not an RCE chain. Are these vulnerability reports intentionally overstated?
[3 hidden]5 mins ago
AI is doing quite well at automating the escalation of small memory bugs (which can usually theoretically cause RCEs) into actual RCE exploits. This bug has a similar nature to php2shell.
[3 hidden]5 mins ago
Yes, the actual post just implies possibility

> Exploiting this bug to mount an Remote Code Execution attack (RCE) can't be ruled out.

[3 hidden]5 mins ago
Today's LLMs can often escalate to RCE, so it makes sense to assume the worst.
[3 hidden]5 mins ago
it does not make sense to say RCE for something that does not have an open port on the system
[3 hidden]5 mins ago
If someone opens an encrypted email that came from an attacker using GnuPG and code is executed on his machine as a result, that is still remote code execution.
[3 hidden]5 mins ago
What is not "remote" code execution under this definition?
[3 hidden]5 mins ago
Have you ever heard of IP over Avian Carrier? It might help expand your definition of “remote”.

In all seriousness, “remote” in this case means attacker controlled.

[3 hidden]5 mins ago
It makes sense to assume the worst, then try to achieve it. And only if you achieve it so you tag it as such. You can't announce vulnerabilities to the world based on vibes of what it might do....

"Yeah this is a classic double free. We can't think of a way to transform it into a RCE or something like that, we've also failed at having LLMs do it so far. but in the current climate it could happen so we humbly ask the tag of most dangerous vulnerability please. Not just this disclaimer. We want 9.9 CVE that says RCE!!"

This is ridiculous.

[3 hidden]5 mins ago
Sending somebody a signed message and trigger a double free is a prime example for RCE
[3 hidden]5 mins ago
RCE might be possible, you still need to overlay something useful in the freed memory and bypass ASLR.
[3 hidden]5 mins ago
The mail says "Exploiting this bug to mount an Remote Code Execution attack (RCE) can't be ruled out.". They didn't write this just for fun. gnupg usually downplays security issues.
[3 hidden]5 mins ago
I'd say that is as accurate as they can be. Since it's a library and it's a heap bug they have no idea how a particular application will be affected.

It's still a critical bug, just would not call it a prime example of rce.

[3 hidden]5 mins ago
I mean, the blame is moreso on the title of this HackerNews submission. "RCE can't be ruled out" is not equivalent to "RCE in Gnupg"
[3 hidden]5 mins ago
it can't be ruled out that an RCE exists in other parts of this software either
[3 hidden]5 mins ago
Or any software...
[3 hidden]5 mins ago
"overlay something useful in the freed memory and bypass ASLR"

I thought we reached the point a few years ago where the assumed probability this can be done is 100% ?

[3 hidden]5 mins ago
poc needed.
[3 hidden]5 mins ago
IMHO, these days any kind of UB has to be considered exploitable by an LLM. The times of debating whether something is exploitable or not are over.
[3 hidden]5 mins ago
It's interesting to see how polarizing this comment is, it's being upvoted and downvoted in waves.
[3 hidden]5 mins ago
We are having this debate right now. So it's far from over. Without PoC it's unclear if it's RCE or just overhyped bullshit. See PHP or Nginx "RCE" which required specific crafted settings for it to even work. A video is not a "PoC".

If you believe an LLM can generate an exploit for this - feel free to post one.

[3 hidden]5 mins ago
I agree PoC's should be a requirement for all this exploits.
[3 hidden]5 mins ago
at the very least should be criteria for assigning "high", CVE spam is annoying enough as it is
[3 hidden]5 mins ago
Na, for years I've been seeing crap like this "well there is no exploit" and then a year later one is found.

Quit writing memory free errors in software. Prove your software is safe, not prove that it's not exploitable.

[3 hidden]5 mins ago
A year later you hopefully have updated the software, no loss there.
[3 hidden]5 mins ago
It's more of a "made public" a year later, you have no idea if anyone exploited it in between.

At first I thought the whole Linux everything is a CVE was kind of annoying, but over time, especially with automated exploit finding it really has shown to be in front of what was about to happen.

[3 hidden]5 mins ago

    All software using a GPGME version prior to 2.3.0 either as shared
libary, DLL, or statically linked is affected. Examples of software using GPGME are

   - Gpg4win
   - GnuPG Desktop
   - GnuPG VS-Desktop
   - Most mail clients
   - Many XMPP clients
   - Samba
   - Flatpack
I assume this is in "gpgme" and doesn't affect apt etc? Can someone confirm?
[3 hidden]5 mins ago
What are practical attack vectors for Linux workstations and servers?

The masses of internet users don't know what GPG is. I'd caim the majority of software developers don't have a GPG key and never explicitly verify any signature.

But packages of many distros are verified using GPG. Is the vulnerable component involved or not?

[3 hidden]5 mins ago
> But packages of many distros are verified using GPG. Is the vulnerable component involved or not?

Debian uses it last time I was on a Debian system And I think all Debian based distros that don't modify apt will essentially use GPG to verify the packages as well.

I think it's one of the those programs that pop up in a lot of different things. Personally I use it a fair amount and even use the Symmetric encryption features for some files and for personal password management.

I do think developer are moving away from it thought I agree (and for various reasons that are good).

[3 hidden]5 mins ago
Arch Linux uses gpgme to verify downloaded packages (and optionally, package databases) for example.
[3 hidden]5 mins ago
It’s used a lot in commercial for code signing. We use it with Thales HSMs (there are other things in the middle)
[3 hidden]5 mins ago
Are you sure? (I am not) The announcement says gpgme. Is that the same thing used for basic signatures?
[3 hidden]5 mins ago
Potentially package update/installation? A lot of people use gpg without knowing it.

It's specifically in 'GPGME' though, so more limited scope I think.

[3 hidden]5 mins ago
A lot of those places have switched out the gnupg PGP implementation with sequoia-openpgp.
[3 hidden]5 mins ago
Interesting. Can you give examples. The only places I have met sequoia were conference talks by their maintainer, probably founder.
[3 hidden]5 mins ago
That was my question. Where is gpgme used? Any "unexpected" places?
[3 hidden]5 mins ago
PGP mail?
[3 hidden]5 mins ago
Which almost no one uses.
[3 hidden]5 mins ago
Wrong bubble ;-)
[3 hidden]5 mins ago
If only people in a certain bubble use it, then almost no one actually uses it.
[3 hidden]5 mins ago
> no one actually uses it.

A lot of people use it especially certain high value targets on darknet drug markets who might miss this.

A lot of projects do still use it for signing projects though many have opted for simpler solutions (or unfortunately no signing).

I think Debian still uses it (not sure about ubuntu) in apt.

[3 hidden]5 mins ago
Darknet drug dealers are still an extreme minority of people. You still have not negated my statement.

Sure, GPG gets used for signing packages and that COULD potentially lead to a supply chain attack IF this is not quickly patched.

[3 hidden]5 mins ago
"We are pleased to announce..."
[3 hidden]5 mins ago
Bugfixes are good.
[3 hidden]5 mins ago
Editorialized submission title to be better bait.

The correct title is: GnuPG Security Advisory for GPGME

[3 hidden]5 mins ago
Which wouldn't tell us anything before checking the link
[3 hidden]5 mins ago
The current title is "RCE in Gnupg". A more appropriate title would be "Double free produces posible RCE in GnuPG". The non-editorialized title would also be better because it does not claim there is an RCE that is not known to exist.

"Probable RCE in GnuPG clients" would be appropriate.

When someone posts a Claude POC, then the situation is different.

[3 hidden]5 mins ago
>Double free produces posible RCE in GnuPG

Not even that, just "double free" would be a fair title. Every double free is a possible RCE using this logic. For tens of years we had "double free" vulnerabilities. Calling each and every of them "RCE" makes that word meaningless.

[3 hidden]5 mins ago
Alright, possible RCE would be fair
[3 hidden]5 mins ago
so essentially look at the key before? (and hope your program does not have another RCE...)
[3 hidden]5 mins ago
This is a reminder that Seqouia-PGP exists, and its 'sq' CLI is way more intuitive.
[3 hidden]5 mins ago
The vulnerability is in GpgME (the library), not GnuTLS (the library).
[3 hidden]5 mins ago
more or less than 0 impacted systems?
[3 hidden]5 mins ago
Luckily nobody uses it!