r/java • • 13d ago

Calif discloses Java4Shell flaw in OpenJDK's Base64 decoder

https://runtimewire.com/article/calif-discloses-java4shell-flaw-in-openjdk-s-base64-decoder
128 Upvotes

13 comments sorted by

View all comments

40

u/SleeperAwakened 13d ago

This is really really bad, we have some patching to do!

Better to link to the source!

https://calif.io/java4shell/

10

u/pronuntiator 12d ago

The last paragraphs about reducing the attack surface by removing unneeded features are ironic given the low adoption of the Java module system which would allow for that. Wouldn't help in this particular case, but in general.

10

u/Siedlerchr 13d ago edited 13d ago

But only if you accept payload on a server and you need to have specific hardware

  • Intel Xeon: Ice Lake, Sapphire Rapids, Emerald Rapids, Granite Rapids
  • AMD EPYC and Ryzen: Zen 4 or newer

18

u/TomKavees 13d ago

Or deal with jwt, or connect to a site where somebody else controls the tls certificate, or...

I get your point, but base64 used pretty much everywhere.

4

u/anyOtherBusiness 12d ago

I understood both must be true. So you’re running under the vulnerable Hardware and decode base64 somewhere in your app.

-4

u/Siedlerchr 13d ago

I wonder if it can still be exploited if you run your stuff inside a Docker container.

17

u/TomKavees 13d ago

Of course, container is just a bunch of kernel namespaces, it doesnt restrict access to cpu instructions

-9

u/detroitsongbird 12d ago

Yes. Claude it, there’s a startup flag that’ll work to resolve this until the JDKs get updates.

3

u/yoden 13d ago

Nope

also shared a client-side exploit with us. A Java program that opens a TLS connection to a malicious server can be compromised, even if it exposes no service of its own

2

u/simon_o 11d ago

The client still needs server-level hardware or a new Ryzen.

1

u/kiteboarderni 12d ago

its really really not.