A new vulnerability, tagged as CVE-2023-22071, has been discovered in the PL/SQL component of Oracle Database Server. This post will discuss the details of this vulnerability, the affected versions, exploitation techniques, and potential prevention measures. The vulnerability affects Oracle Database Server versions 19.3-19.20 and 21.3-21.11.

Exploitable Vulnerabilities

The vulnerability allows high privileged attackers with the Create Session and Execute privileges on sys.utl_http with network access via Oracle Net to compromise PL/SQL. Successful attacks require human interaction from a person other than the attacker. While the vulnerability primarily impacts the PL/SQL component, it may also significantly affect additional products, leading to a scope change.

Impact of the vulnerability

Successful exploitation of CVE-2023-22071 can result in unauthorized update, insert, or delete access to some of the PL/SQL accessible data. Additionally, attackers may gain unauthorized read access to a subset of the PL/SQL accessible data. The vulnerability can also cause a partial denial of service (DOS) to the PL/SQL component.

The vulnerability has a CVSS 3.1 Base Score of 5.9, encompassing Confidentiality, Integrity, and Availability impacts. The CVSS Vector for this vulnerability is (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:L).

Example Code Snippet

The following example demonstrates the vulnerable PL/SQL code that may be exploited using the CVE-2023-22071 vulnerability.

DECLARE
  l_url        VARCHAR2(200);
  l_http_req   utl_http.req;
  l_http_resp  utl_http.resp;
  l_buffer     VARCHAR2(200);
BEGIN
  l_url := 'http://example.com/sensitive_data';;
  l_http_req := utl_http.begin_request(l_url, 'GET');
  l_http_resp := utl_http.get_response(l_http_req);

  LOOP
    BEGIN
      utl_http.read_line(l_http_resp, l_buffer, TRUE);
      dbms_output.put_line(l_buffer);
    EXCEPTION
      WHEN utl_http.end_of_body THEN
        EXIT;
    END;
  END LOOP;

  utl_http.end_response(l_http_resp);
END;
/

In this code snippet, the attacker may manipulate the 'l_url' variable to access sensitive information from the server or cause partial denial of service through resource exhaustion.

Prevention measures

Oracle has released patches for the affected versions, and administrators should apply these patches immediately. Oracle's official advisory regarding CVE-2023-22071 can be found at the Oracle Security Alerts page.

Additionally, database administrators should take the following steps to reduce the risk of exploitation of this vulnerability:

1. Limit privileges: Restrict the 'Create Session' and 'Execute' privileges on sys.utl_http to as few users as possible.
2. Network access control: Apply strict firewall rules to prevent unauthorized network access to the Oracle Database Server.

Conclusion

CVE-2023-22071 is a vulnerability that poses a significant risk to the security of PL/SQL databases, potentially leading to unauthorized data manipulation, data leakage, and partial DOS. Organizations using the affected versions of Oracle Database Server should act immediately to apply the necessary patches and improve their security posture.

Timeline

Published on: 10/17/2023 22:15:12 UTC
Last modified on: 10/23/2023 18:20:32 UTC