CVE DatabaseCVE-2012-0507
한국어 권고문 →
CVE-2012-05079.8/CRITICALCISA KEVCWE-843

Oracle Java JRE AtomicReferenceArray Type Confusion Sandbox Bypass and Remote Code Execution (CVE-2012-0507)

⚡ Jump to Patch
Affected Vendors
oracle
Affected Components
java_se, jre
Published Date
2012-06-07
CVSS v3.1
9.8
CRITICAL
EPSS (30d)
98.2%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Oracle Java SE 7 Update 2 and earlier, 6 Update 30 and earlier, and 5.0 Update 33 and earlier

Impact

Remote attackers can completely bypass the JVM sandbox restrictions to execute arbitrary OS commands or cause a denial of service (JVM crash) via a specially crafted Java applet

Mitigation

Immediately upgrade to patched Java versions (Java 7 Update 3, Java 6 Update 31 or higher) and disable Java browser plugins in legacy environments

Affected Products & Version Scope

Oracle Java SE 7 Update 2 and earlier, 6 Update 30 and earlier, and 5.0 Update 33 and earlier (all JRE environments)

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

The primary remediation is to upgrade the Java Runtime Environment to the latest secure release.

bash
# Update OpenJDK to the latest version on Debian/Ubuntu systems
sudo apt-get update
sudo apt-get install --only-upgrade default-jre default-jdk -y

# Update OpenJDK to the latest version on RedHat/CentOS systems
sudo yum update java-1.8.0-openjdk java-1.8.0-openjdk-devel -y

2. Temporary Workaround & Hardening Configuration

If immediate patching is not feasible, disable the Java browser plugin to eliminate the primary remote attack vector.

bash
# Remove Java plugin symbolic links for Firefox on Linux
rm -f ~/.mozilla/plugins/libnpjp2.so
sudo rm -f /usr/lib/mozilla/plugins/libnpjp2.so

# Disable Java Plug-in in Windows environments via Registry modification
reg add 'HKLM\SOFTWARE\JavaSoft\Java Plug-in' /v 'UseJavaPlugin' /t REG_DWORD /d 0 /f

3. Log Audit & IoC Verification Commands

Use the following scripts to identify vulnerable Java installations and audit web server logs for suspicious Java applet requests.

bash
# Check the currently active Java version on the system
java_version=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}')
echo 'Active Java Version: '$java_version

# Scan web server access logs for suspicious Java applet (.jar/.class) requests
echo '=== Scanning Web Logs for Suspicious Java Applet Requests ==='
grep -E '\.(jar|class)\?' /var/log/nginx/access.log /var/log/apache2/access.log 2>/dev/null || echo 'No suspicious requests detected.'
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
SentinelOne Singularity AI EDR
Due to active exploitation history, immediately decommission legacy Java JRE installations or upgrade to a patched version.

Block Kernel Privilege Escalation & Ransomware Payloads Before You Can Reboot

Protect unpatched Windows, Linux, and macOS workloads against in-memory exploitation and lateral movement with autonomous EDR.

100% MITRE ATT&CK Detection · 1-Click Rollback

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2012-0507) is a critical Type Confusion vulnerability (CWE-843) residing in the java.util.concurrent.atomic.AtomicReferenceArray class implementation within the Concurrency component of Oracle Java Runtime Environment (JRE). The root cause lies in the deserialization process of AtomicReferenceArray, where the implementation fails to properly validate that the underlying array is strictly of the Object type. This oversight allows an attacker to supply a subclass array instead of a standard object array, undermining the JVM's type safety guarantees.

2. Exploitation Mechanics & Attack Scenario

An attacker exploits this vulnerability by crafting a serialized AtomicReferenceArray object where the internal array field is manipulated to point to a specific subclass array (e.g., MyClass) instead of Object. When the JVM deserializes this object, the internal reference is successfully established without triggering type validation. Subsequently, the attacker invokes the set() method of AtomicReferenceArray to store an incompatible object type (such as a custom ClassLoader or an object designed to override security policies) into the array. Because the JVM assumes the array is a generic Object, it bypasses the standard runtime type-safety checks. This induces a type confusion state, allowing the attacker to gain unauthorized access to restricted memory spaces, disable the SecurityManager, and execute arbitrary system commands with the privileges of the running process.

3. Infrastructure & Business Impact

With a CVSS score of 9.8, this vulnerability represents a severe threat and is actively listed on CISA's Known Exploited Vulnerabilities (KEV) catalog. Historically, it was heavily integrated into automated exploit kits and used in drive-by download campaigns. Successful exploitation allows unauthenticated remote attackers to compromise client endpoints and server infrastructures hosting legacy Java applications, leading to complete system takeover, data exfiltration, and potential lateral movement within the enterprise network.

Official Vendor Advisories & References

NVD Original English Description

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Update 30 and earlier, and 5.0 Update 33 and earlier allows remote attackers to affect confidentiality, integrity, and availability via unknown vectors related to Concurrency. NOTE: the previous information was obtained from the February 2012 Oracle CPU. Oracle has not commented on claims from a downstream vendor and third party researchers that this issue occurs because the AtomicReferenceArray class implementation does not ensure that the array is of the Object[] type, which allows attackers to cause a denial of service (JVM crash) or bypass Java sandbox restrictions. NOTE: this issue was originally mapped to CVE-2011-3571, but that identifier was already assigned to a different issue.

Frequently Asked SecOps Questions (CVE-2012-0507)

FAQ

Q1. How critical is CVE-2012-0507 and is it actively exploited in the wild?

CVE-2012-0507 is rated CVSS 9.8 (CRITICAL) with a 30-day EPSS exploitation probability of 98.2%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2012-0507?

Primary impacted vendors include oracle across java_se, jre. Scope summary: Oracle Java SE 7 Update 2 and earlier, 6 Update 30 and earlier, and 5.0 Update 33 and earlier (all JRE environments)

Q3. What temporary mitigations or workarounds exist for CVE-2012-0507 before patching?

[Mitigation] Immediately upgrade to patched Java versions (Java 7 Update 3, Java 6 Update 31 or higher) and disable Java browser plugins in legacy environments Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2012-0507

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (oracle)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2012-0507 Oracle Java JRE AtomicReferenceArray Type Confusion Sandbox Bypass and Remote Code Execution (CVE-2012-0507) (CVSS 9.8) - Patch & Workaround | CVE Pulse