Oracle DBMS_XSLPROCESSOR Built-In Package Versions 10.1 - 19.3 |
---|
Security Advisory | |||||||||||||||||||||||||
Far too often we find that powerful tools created for legitimate business purposes can be misused to breach security. In the case of the DBMS_XSLPROCESSOR package, documented by Oracle for customer use, the stated purpose is to provide an interface to manage the contents and structure of XML documents. Sounds perfectly harmless and as you will see below, EXECUTE is granted to PUBLIC. The vulnerability introduced with this package relates to a single object named CLOB2FILE. Simply put ... if I can get data from the database into a variable of CLOB type ... I can use this capability to write it to a file system from which it can later be retrieved. In tests we have used this package to export 200,000 lines of Oracle Database source code in less than one second. |
|||||||||||||||||||||||||
Recommended Security Rules | |||||||||||||||||||||||||
NEVER
|
|||||||||||||||||||||||||
How Oracle Works | |||||||||||||||||||||||||
A database, every database, is of zero value if you cannot import data from one or more sources and if you cannot export data in the form of backups, integration APIs, files, and reports.
Oracle is the world's most feature rich database environment and you cannot say that without simultaneously acknowledging that some of that power comes from the richness of features such as the one provided by DBMS_XSLPROCESSOR. Using a feature rich environment however, comes with responsibilities. If there is a means for getting data out of the database it is your responsibility as an implementer to be aware of it, to understand how it works, and to secure it. This page will help you perform that function. |
|||||||||||||||||||||||||
DBMS_XSLPROCESSOR Package Information | |||||||||||||||||||||||||
AUTHID | CURRENT_USER |
||||||||||||||||||||||||
Constants |
|
||||||||||||||||||||||||
Data Types | -- processor interface type |
||||||||||||||||||||||||
Dependencies |
|
||||||||||||||||||||||||
Documented | Yes | ||||||||||||||||||||||||
Exceptions |
|
||||||||||||||||||||||||
First Available | 10.1 | ||||||||||||||||||||||||
Security Model | Owned by XDB with EXECUTE granted to PUBLIC | ||||||||||||||||||||||||
Source | {ORACLE_HOME}/rdbms/admin/dbmsxslp.sql | ||||||||||||||||||||||||
Subprograms | |||||||||||||||||||||||||
CLOB2FILE | |||||||||||||||||||||||||
Write from a CLOB to a file with given character encoding. If csid is zero or not provided (NULL) the file will be written in the database's character set. |
dbms_xslprocessor.clob2file( |
||||||||||||||||||||||||
col directory_path format a50 |
|||||||||||||||||||||||||
FREEPROCESSOR | |||||||||||||||||||||||||
Free XSL Processor | dbms_xslprocessor.freeProcessor(p IN processor); |
||||||||||||||||||||||||
DECLARE |
|||||||||||||||||||||||||
FREESTYLESHEET | |||||||||||||||||||||||||
Frees a stylesheet object | dbms_xslprocessor.freeStyleSheet(ss IN stylesheet); |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
NEWPROCESSOR | |||||||||||||||||||||||||
Returns a new processor instance | dbms_xslprocessor.newProcessor RETURN processor; |
||||||||||||||||||||||||
See FREEPROCESSOR Demo Above | |||||||||||||||||||||||||
NEWSTYLESHEET | |||||||||||||||||||||||||
Create a new stylesheet using the given DOMDocument and base directory URL Overload 1 |
dbms_xslprocessor.newStyleSheet( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
Create a new stylesheet using the given input file and base directory URLs Overload 2 |
dbms_xslprocessor.newStyleSheet( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
PROCESSXSL | |||||||||||||||||||||||||
Transforms input XML document using given DOMDocument and stylesheet Overload 1 |
dbms_xslprocessor.processXSL( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
Transforms input XML document using given Doc as CLOB Overload 2 |
dbms_xslprocessor.processXSL( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
Transforms input XML document using given DOMDocument and stylesheet and writes output to a file Overload 3 |
dbms_xslprocessor.processXSL( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
Transforms input XML document using given as URL and stylesheet and writes output to a file Overload 4 |
dbms_xslprocessor.processXSL( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
Transforms input XML document using given DOMDocument and stylesheet and writes output to a buffer Overload 5 |
dbms_xslprocessor.processXSL( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
Transforms input XML document using given DOMDocument and stylesheet and writes output to a CLOB Overload 6 |
dbms_xslprocessor.processXSL( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
Transforms input XML document using given DOMDocument and stylesheet and writes output to a CLOB. Provides information if style sheet output method is xml or not. Overload 7 |
dbms_xslprocessor.processXSL( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
Transforms input XML document fragment using given DOMDocumentFragment and stylesheet Overload 8 |
dbms_xslprocessor.processXSL( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
Transforms input XML document fragment using given DOMDocumentFragment and stylesheet and writes output to a file Overload 9 |
dbms_xslprocessor.processXSL( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
Transforms input XML document fragment using given DOMDocumentFragment and stylesheet and writes output to a buffer Overload 10 |
dbms_xslprocessor.processXSL( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
Transforms input XML document fragment using given DOMDocumentFragment and stylesheet and writes output to a CLOB Overload 11 |
dbms_xslprocessor.processXSL( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
READ2CLOB | |||||||||||||||||||||||||
Read from a file to a CLOB and returns a CLOB | dbms_xslprocessor.read2clob( |
||||||||||||||||||||||||
See CLOB2FILE Demo Above | |||||||||||||||||||||||||
REMOVEPARAM | |||||||||||||||||||||||||
Remove a top-level stylesheet parameter | dbms_xslprocessor.removeParam( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
RESETPARAMS | |||||||||||||||||||||||||
Resets the top-level stylesheet parameters | dbms_xslprocessor.resetParams(ss IN stylesheet); |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
SELECTNODES | |||||||||||||||||||||||||
Selects nodes from the tree which match the given pattern | dbms_xslprocessor.selectNodes( |
||||||||||||||||||||||||
See ValueOf Overload 1 Demo Below | |||||||||||||||||||||||||
SELECTSINGLENODE | |||||||||||||||||||||||||
Selects the first node from the tree that matches the given pattern | dbms_xslprocessor.selectSingleNode( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
SETERRORLOG | |||||||||||||||||||||||||
Sets errors to be sent to the specified file | dbms_xslprocessor.setErrorLog( |
||||||||||||||||||||||||
Deprecated | |||||||||||||||||||||||||
SETPARAM | |||||||||||||||||||||||||
Sets the value of a top-level stylesheet parameter. The parameter value is expected to be a valid XPath expression (note that string literal values would therefore have to be explicitly quoted) | dbms_xslprocessor.setParam( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
SHOWWARNINGS | |||||||||||||||||||||||||
Sets warnings TRUE - on, FALSE - off | dbms_xslprocessor.showWarnings( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
TRANSFORMNODE | |||||||||||||||||||||||||
Transforms a node in the tree using the given stylesheet | dbms_xslprocessor.transformNode( |
||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||
VALUEOF | |||||||||||||||||||||||||
Retrieves the value of the first node from the tree that matches the given pattern Overload 1 |
dbms_xslprocessor.valueOf( |
||||||||||||||||||||||||
DECLARE |
|||||||||||||||||||||||||
Overload 2 | dbms_xslprocessor.valueOf( |
||||||||||||||||||||||||
See DBMS_XMLPARSER demo using the link below. |
Related Topics |
DBMS_SQL |
DBMS_XMLPARSER |
Object Privileges |
System Privileges |