Re:Java4Shell: RCE in OpenJDK when processing Base64
by stephenr on Wednesday November 18, 2026 @12:02AM
(#50542081)
> PHP < 8 doesn't have patches coming.
Anyone on a Debian derivative can use Ondřej Surý's packages which have the patch back ported to at least 7.3: https://deb.sury.org/
Also, I'm not sure I'd really trust what looks like LLM generated overly verbose code as a security layer.
When PHP2shell was announced, before the patches were available, I wrote a proxy to sanitize input. You should have an input-sanitizing proxy in front of your app servers anyway instead of waiting for patches for as-yet-undiscovered CVEs.
PHP < 8 doesn't have patches coming. It's either the proxy or be pwned. Some our honeypot machines running PHP 5 got infiltrated with full chained kernel-level exploits. The ones with the proxy didn't. Which one do you want to be?
https://github.com/Qbix/proxy -- now updated to help mitigate java4shell
Having said that, my proxy approach wouldn't fully protect ALL Java apps in this case, because:
A Java program that opens a TLS connection to a malicious server can be compromised, even if it exposes no service of its own.
The problem is that you can't intercept and "heal" TLS connections with a proxy, unless you also spoof the TLS certificates. However, since most Java apps don't pin certs, a workaround is using /etc/hosts and a CA cert added in cacerts. Then the proxy approach works even on outbound traffic. And you don't have to wait for the patches.
so what you'd do is: The usual disclaimers... lock down the executable, removing any ability to read or write files, only pass traffic through like a proxy. Investigate the repo yourself, with your own Claude or ChatGPT etc. The repo even has links to pre-fill the prompts to do just that.I'm putting this out under MIT license to help people, but under this license it disclaims all warranties, including implied warranty for merchantibility etc.