Information
Public database links in Oracle allow database users to connect to remote databases without needing explicit credentials each time.
If an unauthorized user creates a public database link, all users in the database can use it to connect to the remote database. This can lead to data exposure and unauthorized access to sensitive information. Likewise, if an unauthorized user modifies or drops a public database link, this can result in pointing an existing database link to a malicious remote database, queries could return manipulated or incorrect data, leading to data corruption.
Solution
To remediate this setting, execute the following SQL statement, keeping in mind if this is granted in both container and pluggable database, you must connect to both places to revoke. Please ensure proper impact analysis is done before revoking the privilege from a role.
REVOKE CREATE PUBLIC DATABASE LINK FROM <grantee>;
REVOKE ALTER PUBLIC DATABASE LINK FROM <grantee>;
REVOKE DROP PUBLIC DATABASE LINK FROM <grantee>;
In the case of a grant via a role:
REVOKE <rolename> FROM <grantee>;