News for hackers. Stuff that matters.
Re:Java4Shell: RCE in OpenJDK when processing Base64 by EGreg on Tuesday November 17, 2026 @07:54PM (#50540460)
For anyone who cares, I have a solution "for now".

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.

  1. Add maliciousserver.com -> 127.0.0.1 (or proxy IP) in /etc/hosts
  2. Java app resolves the hostname, connects to your proxy on 443
  3. Proxy presents a cert for maliciousserver.com signed by your local CA
  4. JVM checks: right hostname, trusted CA? handshake succeeds
  5. Proxy connects to the real server (using its own resolver that bypasses /etc/hosts, or the real IP directly)
  6. Normalizes Base64 in the response (assuming Calif relies on a wacky base64)
  7. Relays to Java client (safe)
so what you'd do is:

  1. Generate proxy CA cert
  2. Install in JVM truststore (keytool)
  3. /etc/hosts entries for known hostnames
  4. forward_proxy config block (port, ca_cert, ca_key)
  5. You have three options for routing: 
    HTTPS_PROXY env, 
    JVM flags (-Dhttps.proxyHost), 
    or iptables REDIRECT (covers code that ignores proxy vars)
  6. Start qbixproxy
  7. Verify with curl
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.

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.