Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2022-21565

CVE-2022-21565: Oracle Database Privilege Escalation Flaw

CVE-2022-21565 is a privilege escalation vulnerability in Oracle Database Java VM component affecting versions 12.1.0.2, 19c, and 21c. This article covers technical details, affected versions, impact, and mitigation.

Published:

CVE-2022-21565 Overview

CVE-2022-21565 is a vulnerability in the Java VM component of Oracle Database Server. This easily exploitable vulnerability allows a low-privileged attacker with Create Procedure privilege and network access via Oracle Net to compromise the Java VM component. Successful exploitation can result in unauthorized creation, deletion, or modification access to critical data or all Java VM accessible data.

Critical Impact

Attackers with minimal privileges can manipulate or destroy critical database information through the Java VM component, potentially compromising data integrity across the entire Oracle Database environment.

Affected Products

  • Oracle Database Enterprise Edition 12.1.0.2
  • Oracle Database Enterprise Edition 19c
  • Oracle Database Enterprise Edition 21c

Discovery Timeline

  • 2022-07-19 - CVE CVE-2022-21565 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-21565

Vulnerability Analysis

This vulnerability exists within the Java VM component of Oracle Database Server. The flaw allows an authenticated attacker with limited privileges—specifically the Create Procedure privilege—to compromise the integrity of data accessible to the Java VM component. The attack is network-based and requires no user interaction, making it particularly concerning for internet-facing database deployments.

The vulnerability has high integrity impact, meaning successful exploitation enables an attacker to fully compromise the integrity of Java VM accessible data. This includes the ability to create, delete, or modify critical database information without authorization. However, the vulnerability does not affect confidentiality or availability, as data cannot be exfiltrated and service disruption is not possible through this attack vector.

Root Cause

The root cause stems from improper access control within the Java VM component when processing requests from users with the Create Procedure privilege. The component fails to properly validate and restrict operations that should be limited based on the user's privilege level, allowing unauthorized data manipulation.

Attack Vector

The attack is conducted remotely over the network using the Oracle Net protocol. An attacker requires:

  1. Network connectivity to the Oracle Database Server
  2. Valid database credentials with at least low-level access
  3. The Create Procedure privilege granted to their account

Once these conditions are met, the attacker can craft malicious requests through Oracle Net that exploit the Java VM component's insufficient access controls to perform unauthorized data modifications.

The vulnerability mechanism involves improper privilege checking within the Java VM component. When a user with Create Procedure privileges interacts with the Java VM, the component fails to properly restrict certain operations, allowing manipulation of data beyond the user's intended access scope. For complete technical details, refer to the Oracle Security Alert July 2022.

Detection Methods for CVE-2022-21565

Indicators of Compromise

  • Unexpected procedure creation or modification activities by users with Create Procedure privileges
  • Anomalous Java VM activity within the Oracle Database logs
  • Unauthorized data modifications in tables accessible through Java VM stored procedures
  • Unusual Oracle Net traffic patterns targeting the database server

Detection Strategies

  • Monitor Oracle Database audit logs for suspicious Create Procedure activities and Java VM operations
  • Implement database activity monitoring (DAM) solutions to track privilege usage patterns
  • Review user accounts with Create Procedure privilege for unauthorized or excessive access
  • Deploy network monitoring to detect anomalous Oracle Net protocol traffic

Monitoring Recommendations

  • Enable Oracle Database auditing for all Java VM-related operations
  • Configure alerts for bulk data modification operations initiated through Java stored procedures
  • Regularly review and audit user privileges, particularly Create Procedure grants
  • Implement real-time monitoring of database integrity for critical tables

How to Mitigate CVE-2022-21565

Immediate Actions Required

  • Apply the Oracle Critical Patch Update (CPU) from July 2022 immediately
  • Review and restrict Create Procedure privileges to only essential users
  • Audit all existing Java stored procedures for potential compromise
  • Implement network segmentation to limit exposure of Oracle Database servers

Patch Information

Oracle has addressed this vulnerability in the July 2022 Critical Patch Update. Administrators should download and apply the appropriate patches from the Oracle Security Alert July 2022. The patch addresses the improper access controls in the Java VM component that allowed unauthorized data manipulation.

Workarounds

  • Revoke Create Procedure privilege from non-essential database users until patches can be applied
  • Restrict network access to Oracle Database servers using firewall rules and network segmentation
  • Disable the Java VM component if not required for business operations (note: this may impact application functionality)
  • Implement additional database access controls and monitoring as a compensating control
bash
# Review users with Create Procedure privilege
sqlplus / as sysdba <<EOF
SELECT grantee, privilege 
FROM dba_sys_privs 
WHERE privilege = 'CREATE PROCEDURE';
EOF

# Revoke Create Procedure from non-essential users (example)
# REVOKE CREATE PROCEDURE FROM <username>;

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.