Java Buffer Overflow with ByteBuffer (CVE-2020-2803) and Mutable MethodType (CVE-2020-2805) Sandbox Escapes
Two sandbox escape vulnerabilities in Java allowed code running inside a restricted applet to bypass the SecurityManager and gain privileges it should not have. One involved a buffer overflow with ByteBuffer and the other involved a mutable MethodType, both of which could be used to remove or circumvent the security checks.
insinuator.net
Published on insinuator.net
Years ago, Java could be used on websites trough applets. To make these applets secure and not let them access files or do other dangerous stuff, Java introduced the SecurityManager.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the SecurityManager could be accessed and manipulated from within the same process, and specific flaws in ByteBuffer handling and MethodType mutability allowed that guard to be removed or bypassed.
Impact
An attacker could escape the Java sandbox and perform actions that the SecurityManager was meant to prevent, such as accessing files or other dangerous operations.
What the attacker needed
Java applet or sandboxed code running
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Java applets were small programs that ran inside a web page. To stop them reading your files or doing other harmful things, Java used a guard called the SecurityManager that checked every sensitive action. These bugs let a malicious applet get around that guard, so it could do things it was supposed to be blocked from doing.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.