Title: Database objects must be owned by accounts authorized for ownership.
Vulnerability ID: V-32412
IA Controls: None
Description: Database functions and procedures can be coded using definers rights. This allows anyone who utilizes the object to perform the actions the object allows as if they were the owner. This can lead to privileged actions being taken by unauthorized individuals.
If critical tables or other objects rely on unauthorized owner accounts, these objects can be lost when an account is removed.
Within the database, object ownership implies full privileges to the owned object including the privilege to assign access to the owned objects to other subjects. Unmanaged or uncontrolled ownership of objects can lead to unauthorized object grants and alterations.
Check Text: Review system documentation to identify accounts authorized to own database objects. Review accounts in DBMS that own objects.
If any database objects are found to be owned by users not authorized to own database objects, this is a finding.
Fix Text: Update system documentation to include list of accounts authorized for object ownership.
Re-assign ownership of authorized objects to authorized object owner accounts.[divider]
Check each DB to see who the owner is. You can do this with the following script:
SELECT DB.name AS DBName ,
LG.name AS DBOwner
FROM sys.databases DB
INNER JOIN sys.syslogins LG ON DB.owner_sid = LG.sid
Use the results from this query to verify that each owner is authorized to own the database and either update documentation accordingly, or change the owner to an approved account.