V-276227
SV-276227r1149590_rule
CAT II
Database objects must be owned by Azure SQL Managed Instance principals authorized for ownership.
From: Microsoft Azure SQL Managed Instance Security Technical Implementation Guide (V1R1)
Description
<VulnDiscussion>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. Database functions and procedures can be coded using definer's rights. This allows anyone who utilizes the object to perform the actions if they were the owner. If not properly managed, this can lead to privileged actions being taken by unauthorized individuals.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>
Check Procedure
Review system documentation to identify Azure SQL Managed Instance accounts authorized to own database objects.
If the Azure SQL Managed Instance ownership list does not exist or needs to be updated, this is a finding.
The following query can be used to make this determination:
;with objects_cte as
(SELECT o.name, o.type_desc,
CASE
WHEN o.principal_id is null then s.principal_id
ELSE o.principal_id
END as principal_id
FROM sys.objects o
INNER JOIN sys.schemas s
ON o.schema_id = s.schema_id
WHERE o.is_ms_shipped = 0
)
SELECT cte.name, cte.type_desc, dp.name as ObjectOwner
FROM objects_cte cte
INNER JOIN sys.database_principals dp
ON cte.principal_id = dp.principal_id
ORDER BY dp.name, cte.name
If any of the listed owners is not authorized, this is a finding.
Fix Text
Document and obtain approval for any account(s) authorized for object ownership.
If necessary, use the ALTER AUTHORIZATION command to change object ownership to an authorized account.
Example provided below.
ALTER AUTHORIZATION ON OBJECT::test.table TO AuthorizedUser;
Refer to: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-authorization-transact-sql
CCI Reference
CCI-001499- Created
- 2026-04-07 20:08:22
- Last Updated
- 2026-04-07 20:08:22