Oracle Application Express

Oracle APEX (also known as APEX) is an enterprise low-code application development platform from Oracle Corporation. APEX is used for developing and deploying cloud, mobile and desktop applications. The platform is a web-based integrated development environment (IDE) with a range of features including wizards, drag-and-drop layout and property editors to simplify the process of building applications and pages.

Background
APEX is currently a fully-supported, no-cost feature of the Oracle Database and can be installed anywhere an Oracle Database runs. APEX is also offered on Oracle's Cloud across various services including Autonomous Database Cloud Services and the stand-alone fully managed APEX Application Development service.

Oracle APEX has had many name changes since its inception in 2000, including:
 * Flows
 * Oracle Platform
 * Project Marvel
 * HTML DB
 * Application Express (APEX) aka Oracle APEX

APEX was created by Mike Hichwa, a developer at Oracle, after the development of his previous project, WebDB, started to diverge from his original vision. Although APEX shares some functionality with Web DB, it was developed from scratch, and there is no upgrade path from Web DB to APEX. When tasked with building an internal web calendar, Hichwa enlisted the help of Joel Kallman and started development on a project called Flows. Hichwa and Kallman co-developed the Web Calendar and Flows, adding features to Flows as they needed them to develop the calendar. Early builds of Flow had no front-end, so all changes to an application had to be made in SQL*Plus via inserts, updates and deletes.

APEX is extensively used internally by Oracle to develop its support sites. The AskTom knowledge base, online store, Dev Gym, and livesql run on APEX.

With version 5.2, the numbering was changed to 18.1, indicating the year and quarter of release. This change is associated with Oracle's new numbering nomenclature. The latest version of the Oracle APEX is 24.1 and was released on June 17, 2024.

Low-code environment
While APEX has existed since 2004 in one form or another, it has recently been included in a new category of application development platforms called low-code. These low-code environments can trace their origins to 4GL programming languages and rapid application development (RAD) tools. Since APEX was originally marketed as a RAD tool, this progression is a logical one. APEX allows building web applications with no-code. When the requirements are more complex, APEX allows the extension of the Low-Code objects through a declarative framework. This framework lets the developer define custom logic, business rule, and user interfaces. The developer can do this through the inclusion of SQL, PL/SQL, HTML, JavaScript, or CSS as well as APEX plug-ins. APEX permits developers to go from no-code to low-code to more code.

Security
There is a that the abstracted nature of APEX applications results in a relatively secure user environment. However, APEX applications suffer from the same classes of application security flaws as other web applications based on more direct technologies such as PHP, ASP.net and Java.

The main classes of vulnerability that affect APEX applications are: SQL injection, Cross-site scripting (XSS), and Access Control.

APEX applications inherently use PL/SQL constructs as the base server-side language. As well as accessing data via PL/SQL blocks, an APEX application will use PL/SQL to implement authorization and to conditionally display web page elements. This means that generally APEX applications suffer from SQL injection when these PL/SQL blocks do not correctly validate and handle malicious user input. Oracle implemented a special variable type for APEX called Substitution Variables (with a syntax of "&NAME.") and these are not safe and lead to SQL Injection. Where the injection occurs within a PL/SQL block an attacker can inject an arbitrary number of queries or statements to execute. Escaping special characters and using bind variables is the right way to code to ensure no XSS and SQL injection.

Cross-Site Scripting vulnerabilities arise in APEX applications just like other web application languages. Oracle provides the htf.escape_sc function to escape user data that is displayed within a rendered HTML response. The reports that APEX generates also provide protection against XSS through the Display As setting on report columns. Originally the default was for reports to be created without any escaping of the columns, although recent versions now set the column type to escape by default. Column definitions can be queried programmatically to check for columns that do not escape the value.

To control access to resources within an APEX application a developer can assign authorization schemes to resources (such as pages and items). These must be applied consistently in order to ensure that resources are appropriately protected. A typical example of inconsistent access-control being applied is where an authorization scheme is set for a Button item, but not the associated Process that is performed when the button is clicked. A malicious user can perform the process (through JavaScript) without requiring the actual Button to be accessible.

Since APEX 4.0, the Application Builder interface provides some limited assessment of the security posture through the Advisor utility.

Third-party libraries
Developers may improve and extend their APEX applications by using third-party libraries. Among them are jQuery Mobile (HTML5-based user interface), JQuery UI (user interface for the web), AnyChart (JavaScript/HTML5 charts), CKEditor (web text editor) and others. Experts say it is an advantage of applying the latest APEX patches that the external libraries that come with APEX carry an update, too. However, many of the libraries come out with newer versions more frequently than there are APEX patches.

APEX and Oracle Database Express Edition (XE)
Oracle APEX can be run inside Oracle Database Express Edition (XE), a free entry-level database. Although the functionality of APEX isn't intentionally limited when running on XE, the limitations of the database engine may prevent some APEX features from functioning. Also, Oracle XE has limits for CPU, memory and disk usage.