CVE-2012-4681: Oracle Java 7 SecurityManager Bypass and Remote Code Execution
- Vendors
- Red HatOracle Corporation
CVE-2012-4681 comprises vulnerabilities in Oracle Java SE 7 Update 6 and earlier that allow a crafted Java applet to bypass SecurityManager restrictions and execute arbitrary code. The exploitation chain uses com.sun.beans.finder.ClassFinder.findClass and an exception involving forName to obtain restricted class references, including sun.awt.SunToolkit. Reflection with a trusted immediate caller then enables getField to access and modify private fields, allowing the applet to grant itself permissions outside its sandbox. OpenJDK 7 and IcedTea 2.3.0 are also affected. Exploitation was observed in the wild in August 2012, and public exploit code subsequently appeared in numerous exploit kits.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Remote attackers can escape the Java applet sandbox and execute arbitrary code with the operating-system privileges of the Java plug-in process. Successful exploitation can enable malware installation, access to or modification of user-accessible data, and compromise of the affected account. System-wide compromise depends on the privileges available to that process; the vulnerability does not inherently confer administrator or SYSTEM privileges.
Mitigation
If you can’t patch tonight, do this now.
Disable or remove the Java browser plug-in and Java Deployment Toolkit plug-in in every installed browser. Disable Java Web Start, including JNLP file associations where necessary, to close alternative invocation paths. Verify that all browser and operating-system launch mechanisms are covered rather than relying on a single browser setting. Applet-blocking controls such as NoScript can reduce exposure but do not replace patching or removal.
Remediation
Patch, then assume compromise.
Install a vendor-fixed Java release. Oracle Java 7 Update 7 and IcedTea 2.3.1 introduced fixes for this vulnerability. These historical releases are obsolete and should not be treated as current secure deployment targets; use a supported, fully patched runtime where Java remains necessary. Remove Java entirely from systems that do not require it.
Exploits
1 exploit validated by Mallory's analysis.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2012-4681 exploited in the wild?
- Yes. As of Nov 18, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Mar 3, 2022.
- Is there a public exploit for CVE-2012-4681?
- Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2012-4681, the earliest disclosed Aug 26, 2012.
- Is there a patch for CVE-2012-4681?
- Install a vendor-fixed Java release. Oracle Java 7 Update 7 and IcedTea 2.3.1 introduced fixes for this vulnerability.
- What products are affected by CVE-2012-4681?
- Oracle Corporation Jdk, Red Hat Enterprise Linux Desktop, Red Hat Enterprise Linux Eus, Red Hat Enterprise Linux Server, Red Hat Enterprise Linux Workstation, and 1 more.
- How severe is CVE-2012-4681?
- CVE-2012-4681 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 98.5% (100th percentile) as of Nov 18, 2026.
Recent activity
17 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.