← Security
Oracle · Security

How to find objects granted to PUBLIC in Oracle

Hunt for object privileges granted to PUBLIC, a common over-permission, using DBA_TAB_PRIVS filtered to grantee PUBLIC.

Tested on11g12c18c19c21c23ai26ai

Hunt for objects granted to PUBLIC, a common over-permission that widens the attack surface. Oracle-owned schemas are filtered out to cut noise.

SELECT owner, table_name, privilege, grantor
FROM   dba_tab_privs
WHERE  grantee = 'PUBLIC'
   AND owner NOT IN ('SYS','SYSTEM')
ORDER  BY owner, table_name, privilege;
SecurityPUBLICDBA_TAB_PRIVS