News for hackers. Stuff that matters.
Re:Upload2Shell · CVE-2026-125396 by hannob on Saturday November 21, 2026 @03:25PM (#50593293)
It's been known for a while, and certainly long before the recent AI vuln flood, that ghostscript is really problematic in terms of security.

Ultimately, postscript is its own programming language, and executing a programming language in a secure, sandboxed way is not trivial. ghostscript has only a very poor pseudo sandbox that fails regularly. Unfortunately, ghostscript is the only implementation of postscript that's out there.

All of that would matter much less if people only used it to parse postscript. But it's used indirectly by imagemagick (you can disable it), which means many people using imagemagick to parse images from untrusted sources get exposed to ghostscript's poor security.

Re:Upload2Shell · CVE-2026-125396 by viraptor on Saturday November 21, 2026 @04:16PM (#50593726)
> Unfortunately, ghostscript is the only implementation of postscript that's out there.

That needs lots of qualifiers. It's the only popular and widely distributed open-source implementation with known good performance and wide compatibility.

There were so many other implementations and vibed ports already that I expect ghostscript to be actually replaced in distros within a year or two. Very random example https://github.com/AndyCappDev/postforge

Re:Upload2Shell · CVE-2026-125396 by fock on Sunday November 22, 2026 @12:40AM (#50596638)
requirements: Cairo, psutils, Pillow.
Re:Upload2Shell · CVE-2026-125396 by viraptor on Sunday November 22, 2026 @01:20AM (#50596824)
Why is it interesting?
Re:Upload2Shell · CVE-2026-125396 by __del__ on Sunday November 22, 2026 @02:58AM (#50597294)
i imagine those dependencies are non-trivial outside of linux
Re:Upload2Shell · CVE-2026-125396 by zettabomb on Sunday November 22, 2026 @05:36AM (#50598285)
They're trivial anywhere you have Python.
Re:Upload2Shell · CVE-2026-125396 by fock on Sunday November 22, 2026 @01:09PM (#50602227)
they're also a trivial way to call all amounts of random C-code with... Probably even gs...
Re:Upload2Shell · CVE-2026-125396 by viraptor on Sunday November 22, 2026 @06:37AM (#50598690)
Once you want to support everything ghostscript does, nothing is trivial. Ghostscript depends on fun stuff too https://packages.ubuntu.com/stonking/libgs10

But it could be worse. Cairo and Pillow are very established.

Re:Upload2Shell · CVE-2026-125396 by trebligdivad on Saturday November 21, 2026 @05:04PM (#50594095)
Yes, and people didn't previously write big webpages, come up with a fancy name, and notify about a dozen different companies before just writing a ghostscript fix.
Re:Upload2Shell · CVE-2026-125396 by werrett on Sunday November 22, 2026 @03:43AM (#50597528)
No previously it was just confined to OpenSSL bugs (2014) [1], linux kernel race conditions (2016) [2], CPU speculative execution (2018) [3] just to randomly list some of the earlier ones.

It quickly became cringe, but the annoyance you're feeling right now is not due to folks branding vulns.. It's that the rate of these bugs has gone up 5-20x since ~July this year.

Unfortunately this is the new normal. It's not going to get "better" any time soon.

[1]: https://www.heartbleed.com/ [2]: https://dirtycow.ninja/ [3]: https://spectreattack.com

Re:Upload2Shell · CVE-2026-125396 by trebligdivad on Sunday November 22, 2026 @11:00AM (#50600844)
Oh I still regard 2014 as modern; remember Ghostscript came out in 1988 - I've been using it since the mid 90's!
Re:Upload2Shell · CVE-2026-125396 by g-b-r on Saturday November 21, 2026 @06:08PM (#50594550)
Hopefully few people install Ghostscript if they don't need it, on a server that processes user uploads
Re:Upload2Shell · CVE-2026-125396 by WesolyKubeczek on Saturday November 21, 2026 @06:33PM (#50594709)
You install ImageMagick, it most likely depends on Ghostscript.

You use something else than ImageMagick, say, to resize an uploaded image, and the moment it sees a color-managed image, it will produce something that looks like puke.

I had to do a very custom build of ImageMagick to get rid of dependencies on libgs and libX11. It wasn't fun.

Re:Upload2Shell · CVE-2026-125396 by g-b-r on Saturday November 21, 2026 @11:19PM (#50596196)
Yeah, sadly true
Re:Upload2Shell · CVE-2026-125396 by viraptor on Sunday November 22, 2026 @12:11AM (#50596513)
ImageMagick was problematic for so long by pulling everything and the kitchen sink as dependencies. It's just not something you'd like to replace because it's got nice features and... works. It feels absurd but right now, if you have a very narrow use case (like just resizing), it may be better to make an LLM create an alternative, in a safer language, with validated core components, tested on a large number of samples.
Re:Upload2Shell · CVE-2026-125396 by asimovDev on Sunday November 22, 2026 @01:58AM (#50597000)
Something that uses CImg just for resizing could be a decent alternative. It’s a library but they provided a nice cli for it the last time i checked
Re:Upload2Shell · CVE-2026-125396 by g-b-r on Sunday November 22, 2026 @03:25AM (#50597454)
Yes, it seems much smaller than ImageMagick.

ImageMagick has a big attack surface, when most people probably use it just for cropping and resizing.

Just use something leaner, when you can.

Re:Upload2Shell · CVE-2026-125396 by WesolyKubeczek on Sunday November 22, 2026 @06:55AM (#50598790)
„When you can” is doing the heavy lifting here. Also, sometimes you need to process PostScript-adjacent things.
Re:Upload2Shell · CVE-2026-125396 by amiga386 on Sunday November 22, 2026 @02:51PM (#50603224)
Another alternative is GraphicsMagick (https://www.graphicsmagick.org/) which aims to be API and utility compatible with ImageMagick, but spends most of its development effort on fuzzing, verification, etc. It's a more secure alternative to ImageMagick for those who've developed something significant that depends on ImageMagick.
Re:Upload2Shell · CVE-2026-125396 by kalleboo on Sunday November 22, 2026 @08:27AM (#50599504)
I was looking through the PPDs a Brother printer installed for Linux, it had a pre-built ghostscript binary in there that hadn't been updated in god knows how long. I wonder if printing a PDF with an embedded font or something could trigger that.
Re:Upload2Shell · CVE-2026-125396 by koolba on Saturday November 21, 2026 @07:11PM (#50594927)
> Unfortunately, ghostscript is the only implementation of postscript that's out there.

This sounds like an afternoon’s worth of prompting could double the number of implementations.

Re:Upload2Shell · CVE-2026-125396 by wolfi1 on Sunday November 22, 2026 @12:33AM (#50596619)
could be, but it's just ghostscript, rewritten
Re:Upload2Shell · CVE-2026-125396 by Natsu on Sunday November 22, 2026 @06:07AM (#50598492)
[delayed]
Re:Upload2Shell · CVE-2026-125396 by thayne on Sunday November 22, 2026 @11:37AM (#50601173)
A lot of these 4shell vulns are only theoretical RCE. That's not to say they aren't serious, but I think the severity is exaggerated a fair amount.
Re:Upload2Shell · CVE-2026-125396 by anthk on Sunday November 22, 2026 @09:58AM (#50600302)
GS should be pledged under OpenBSD.
Re:Upload2Shell · CVE-2026-125396 by mghackerlady on Sunday November 22, 2026 @04:59PM (#50604358)
Isn't GS GPLd? I imagine they'd attempt to clone it or make their own GS-esque thing if they though it was a big enough problem to warrant stepping in