CVE-2021-2054

7.2 HIGH

📋 TL;DR

This vulnerability in Oracle Database Server's RDBMS Sharding component allows high-privileged attackers with specific database privileges (Create Any Procedure, Create Any View, Create Any Trigger) and network access via Oracle Net to compromise the sharding system. Successful exploitation can lead to complete takeover of RDBMS Sharding, affecting Oracle Database versions 12.2.0.1, 18c, and 19c.

💻 Affected Systems

Products:
  • Oracle Database Server
Versions: 12.2.0.1, 18c, 19c
Operating Systems: All platforms running affected Oracle Database versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires RDBMS Sharding component to be installed and configured. Attacker needs Create Any Procedure, Create Any View, Create Any Trigger privileges and Oracle Net access.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of RDBMS Sharding allowing attacker to execute arbitrary code, access/modify all sharded data, and disrupt database availability.

🟠

Likely Case

Privileged database user exploits the vulnerability to gain unauthorized access to sharded data and potentially escalate privileges within the database environment.

🟢

If Mitigated

Limited impact due to proper privilege separation, network segmentation, and access controls preventing high-privileged attackers from reaching vulnerable components.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Vulnerability is described as 'easily exploitable' but requires specific high-level database privileges. No public exploit code identified in references.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Apply patches from Oracle Critical Patch Update January 2021

Vendor Advisory: https://www.oracle.com/security-alerts/cpujan2021.html

Restart Required: Yes

Instructions:

1. Download appropriate patch from Oracle Support. 2. Apply patch following Oracle's patching procedures. 3. Restart database instances. 4. Verify patch application.

🔧 Temporary Workarounds

Restrict Privileges

all

Remove or restrict Create Any Procedure, Create Any View, Create Any Trigger privileges from users who don't absolutely need them.

REVOKE CREATE ANY PROCEDURE FROM <username>;
REVOKE CREATE ANY VIEW FROM <username>;
REVOKE CREATE ANY TRIGGER FROM <username>;

Network Access Control

all

Restrict Oracle Net access to only trusted hosts and networks using firewall rules and Oracle Net configuration.

# Configure Oracle Net listener.ora to restrict access
# Use firewall rules to limit connections to database ports

🧯 If You Can't Patch

  • Implement strict principle of least privilege for database users, especially for Create Any privileges
  • Segment database network and implement strict access controls to limit Oracle Net exposure

🔍 How to Verify

Check if Vulnerable:

Check Oracle Database version and if RDBMS Sharding component is installed: SELECT * FROM v$version; and check for sharding components.

Check Version:

SELECT * FROM v$version;

Verify Fix Applied:

Verify patch application through Oracle OPatch utility: opatch lsinventory | grep -i 'Critical Patch Update'

📡 Detection & Monitoring

Log Indicators:

  • Unusual CREATE PROCEDURE/VIEW/TRIGGER statements from unexpected users
  • Failed privilege escalation attempts in audit logs
  • Unusual network connections to Oracle Net ports

Network Indicators:

  • Unexpected Oracle Net connections from unauthorized sources
  • Suspicious database protocol traffic patterns

SIEM Query:

source="oracle_audit" AND (event_type="CREATE" AND (object_type="PROCEDURE" OR object_type="VIEW" OR object_type="TRIGGER")) AND user NOT IN ("authorized_users")

🔗 References

📤 Share & Export