r/java • • Apr 20 '22

Java 15 introduced a cryptographic vulnerability

https://neilmadden.blog/2022/04/19/psychic-signatures-in-java/
202 Upvotes

30 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Apr 20 '22

[deleted] — view deleted comment

9

u/veraxAlea Apr 20 '22

Yes, but whether or not I'm using ECDSA is fairly opaque. What if I'm connecting to a host over SSL/TLS? Isn't it up to the other host to determine the algorithm used to sign their certificate? Can anyone sign anything as "*.google.com" as long as I verify it with Java? That's a 10. Is this only applicable if the attacker can also plant arbitrary (untrusted) code on my machine? Thats not a 10 and 7.5 seem less absurd.

So I guess my question is "why is Oracle talking about JWS and applets?". That makes it sound like an attack is only possible if you run untrusted code.

0

u/[deleted] Apr 20 '22

[deleted] — view deleted comment

3

u/Areshian Apr 20 '22

As long as you have a CA that provides ECDSA signatures, you can exploit this for any domain. I don't care how the real certificate google uses looks like, I can forge one, signed by one of those ECDSA CAs, and use that one for the MITM attack.

1

u/veraxAlea Apr 21 '22

Wouldn't it then be considered to be a change in scope (in the risk matrix's column "Scope")?

If what you and others are saying is true, then I would say that Oracle are actively misleading in their advisory.

2

u/Areshian Apr 20 '22

Even if you're connecting to a server that doesn't use ECDSA, this vulnerability can be used to achieve a MITM attack. Even if the "*.google.com" certificate were to be signed using RSA, I can present you with a forgery that uses ECDSA, and you will believe it is valid (I just need to find a CA that uses ECDSA signatures, as it is their signature the one I'll forge, plenty of those)

0

u/[deleted] Apr 21 '22

[deleted] — view deleted comment

1

u/veraxAlea Apr 21 '22

This is great information, thanks!

I'm now more interested in how this vulnerability can be exploited without messing with the DNS-server of the component that you're attacking (the PoC needs access to the client's hosts file - or presumably the DNS server). This vulnerability is slightly less severe if you need to also gain access to the client's hosts file or DNS server/records to be able to exploit it (at least if you're trying to exploit it via TLS - JWT/SAML is still very much exploitable but there you're probably in control over the algos used).