well, somehow it avoided being hacked for a decade. If a .pdf was indeed responsible they can disable .pdf uploads.
Nah, it wouldn't work. 4chan doesn't do file validation like a modern website that follows best practices.
Like the way you're supposed to do it in PHP, is make an FINFO object from the file and then pass that to the finfo filetype function to get a guess based on the magic bytes of the file as to what it is (which is still bypassable, but not as easily). Then, after you do that, you pass it on to other processing.
4chan takes files and raw dogs them into command line image processing utilities like pngcrunch, gifsicle, ffmpeg, and ghostscript (what got hit here) and uses those tools as validation; more or less, they assume that if there's an error in processing with the cmd utility, then it isn't really that file type. They do a few other things with these utilities other than basic validation, but that's mostly to strip off shit like rar/jpgs, cornelia archives, etc.
With the system being ancient as fuck, all of these command line utilities are capped at a certain old version. They can't update them to the most recent versions, since the operating system itself is too old. They'd have to manually backport a lot of packages, which would be even more work than fixing their shitty php script.
All of those old versions of the applications have known vulns. Not all of them are necessiarily weaponizable to get RCE in 4chan's context,, but all of them have vulns nontheless and it's possible even more vulns could be discovered in the future that could be successfully weaponized, simply by the nature of how security research goes.
They
must fix this, or else they're just going to get hit again in the near future. To do this, they need to rewrite their code to work on modern systems.