Critical RCE found in popular Ghostscript open-source PDF library
bleepingcomputer.com
bleepingcomputer.com
Through a combination of (1) an integer overflow in an open-source PDF compression library, (2) a Turing-complete compression codec, and (3) CoreGraphics noticing that the "gif" in your iMessage is actually a PDF and helpfully decoding it for you, NSO was able to bootstrap a purpose-built virtual machine, upon which they ran their sandbox-escape.
I highly recommend reading this post[1] by Project Zero if you haven't already.
[0]https://en.wikipedia.org/wiki/FORCEDENTRY
[1]https://googleprojectzero.blogspot.com/2021/12/a-deep-dive-i...
If you must run it then make it 100% isolated, for instance in a lambda with no api credentials or IAM permissions, & do s3 input/output by passing presigned urls. Make it ok to have RCE.
Where is the "Remote" in this RCE ?
So, the whole RCE thing is probably pretty true in this case.
They might be stressing the "remote" bit though, just so it sinks in for people using it as part of a document conversion pipeline or something. But, that's just me guessing wildly. :)
Examples of non-browser RCEs:
* Microsoft Exchange Server and Windows: https://krebsonsecurity.com/2022/01/wormable-flaw-leads-janu...
* Microsoft Office: https://krebsonsecurity.com/2023/07/apple-microsoft-patch-tu...
* Apache Struts: https://krebsonsecurity.com/2018/08/experts-urge-rapid-patch...
But it is a valid question to ask why it counts as an RCE.
On the one hand, they say:
> Successful exploitation requires user interaction by the victim.
And on the other hand
> Local: No
> Remote: Yes
The bugzilla bug tracker for Ghostscript is currently down for maintenance, so can’t browse it for more details at the moment.
But I wonder if for example a web server that uses Ghostscript to convert documents could be vulnerable. In which case RCE classification makes sense.
Otherwise, do they count it as RCE even if it involves tricking a user into opening a bad file using Ghostscript? If navigating to a bad website with a vulnerable browser counts as RCE in other cases then perhaps opening a bad file with Ghostscript counts as RCE as well?
Local priv escalation is something like a root exploit where you don't trust the user.
It's an RCE because the form of the attack is that Ghostscript ends up executing code that isn't part of Ghostscript. Code is written outside the system ("remote code") and then executed inside it ("execution").
A malicious PDF that causes Ghostscript to execute arbitrary code would contrast with a malicious PDF that causes Ghostscript to execute inappropriate code that is nevertheless part of Ghostscript. The RCE allows the attacker to do anything the computer can do. The other one allows them to do something (but not necessarily anything) that Ghostscript can do.
If this is an RCE then all bugs that could lead to code execution are RCEs because, theoretically, I can put some piece of code in front of it that listens on the network.
This is an unexpected code execution bug. Calling it RCE would suggest that systems that let you double-click on documents to open them are RCEs because I can name an elf executable AliceAndBobAtTheBeach.jpg.