search menu icon-carat-right cmu-wordmark

CERT Coordination Center

Oracle TNS protocol fails to properly validate authentication requests

Vulnerability Note VU#871756

Original Release Date: 2006-01-20 | Last Revised: 2006-01-24

Overview

The Oracle TNS protocol authentication mechanism fails to properly sanitize authentication requests, possibly allowing a remote attacker to execute arbitrary SQL statements with elevated privileges.

Description

Oracle databases authenticate and manage database connections via Oracle Transparent Network Substrate (TNS ) Listeners. According to a report by Imperva, Inc.,

The standard authentication mechanism requires a client to supply a valid pair of user name and password. During the login process an Oracle user with no more than “create session” privileges can execute commands in the context of the special database user SYS. This grants any user the highest administrative privileges possible.

The authentication part of the protocol is comprised of two steps, including two different client requests and two server responses respectively. The first request (message code 0x76) contains only the user name while the second (message code 0x73) contains the user name and an obfuscated password.

This second request also contains a list of name-value pairs describing various attributes of the client. The value named “AUTH_ALTER_SESSION” is intended for setting up session attributes related to the locale and language, in the form of an ALTER SESSION SQL statement.

It turns out that this value can contain any SQL statement. Moreover, this command is executed in the context of the SYS user, which operates outside of the Oracle access control mechanism. Thus, by setting the value of “AUTH_ALTER_SESSION” to an arbitrary SQL statement an attacker can execute any arbitrary command in the database. In particular, the attacker can create a new database account and create DBA privileges to the new account.

Note that valid login credentials are needed to exploit this vulnerability.

Based on research into public information, we believe that this issue is Oracle vuln# DB18 in the Oracle CPU for January 2006. However, there is not sufficient information to authoritatively relate Oracle vulnerability information to information provided by other parties.

Impact

A remote attacker, with valid login credentials may be able to execute arbitrary SQL statements with elevated privileges.

Solution

Apply patches
This issue is corrected in the Oracle Critical Patch Update for January 2006.

Vendor Information

871756
 

Oracle Corporation Affected

Updated:  January 20, 2006

Status

Affected

Vendor Statement

No statement is currently available from the vendor regarding this vulnerability.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

Please see http://www.oracle.com/technology/deploy/security/pdf/cpujan2006.html.

If you have feedback, comments, or additional information about this vulnerability, please send us email.


CVSS Metrics

Group Score Vector
Base
Temporal
Environmental

References

Acknowledgements

This vulnerability was reported by Oracle and Amichai Shulman of Imperva, Inc.

This document was written by Jeff Gennari.

Other Information

CVE IDs: CVE-2006-0265
Severity Metric: 12.38
Date Public: 2006-01-17
Date First Published: 2006-01-20
Date Last Updated: 2006-01-24 16:00 UTC
Document Revision: 22

Sponsored by CISA.