套用到Windows 10 Windows 10, version 1607, all editions Win 10 Ent LTSC 2019 Win 10 IoT Ent LTSC 2019 Windows 10 IoT Core LTSC Windows 10 Enterprise LTSC 2021 Windows 10 IoT Enterprise LTSC 2021 Windows 10, version 22H2, all editions Windows 11 Home and Pro, version 21H2 Windows 11 Enterprise Multi-Session, version 21H2 Windows 11 Enterprise and Education, version 21H2 Windows 11 IoT Enterprise, version 21H2 Windows 11 Home and Pro, version 22H2 Windows 11 Enterprise Multi-Session, version 22H2 Windows 11 Enterprise and Education, version 22H2 Windows 11 IoT Enterprise, version 22H2 Windows 11 SE, version 23H2 Windows 11 Home and Pro, version 23H2 Windows 11 Enterprise and Education, version 23H2 Windows 11 Enterprise Multi-Session, version 23H2 Windows 11 IoT Enterprise, version 23H2 Windows 11 SE, version 24H2 Windows 11 Enterprise and Education, version 24H2 Windows 11 Enterprise Multi-Session, version 24H2 Windows 11 Home and Pro, version 24H2 Windows 11 IoT Enterprise, version 24H2 Windows Server 2008 Windows Server 2008 R2 Windows Server 2012 Windows Server 2012 R2 Windows Server 2016 Windows Server 2019 Windows Server, version 23H2 Windows Server 2025

原始發佈日期: 2025 年 4 月 8 日

KB 識別碼:5058189

摘要

Windows 中存在一個弱點,允許未經授權的用戶檢視他們無權存取之資源的完整檔案路徑。 當用戶擁有上層資料夾 的FILE_LIST_DIRECTORY 存取權,並取得 目錄變更通知時,可能會發生此弱點。

如需有關此弱點的詳細資訊,請參閱 CVE-2025-21197CVE-2025-27738

詳細資訊

此弱點的修正程式包含在 2025 年 4 月 8 日或之後發行的 Windows 更新中。

您可以將此修正套用至 NTFSReFS 卷,以避免此弱點。 此修正程式會針對變更的檔案或資料夾的上層資料夾執行FILE_LIST_DIRECTORY存取檢查,然後再向未經授權的使用者報告變更。 如果使用者不具備必要的許可權,變更通知將會被篩選掉,防止未經授權的檔案路徑洩漏。

此修正程式預設為停用,以防止任何非預期的安全性風險或應用程式中斷。

若要啟用此修正程式,您可以在受影響的系統上設定登錄機碼值或組策略密鑰值。 若要執行這項操作,請使用下列其中一種方法。

方法 1:登錄

在 Windows 登錄中,開啟 [ 原則 ] 或 [文件系統 ] 子機碼中的修正程式。

謹慎 如果已啟用 [原則 ] 和 [文件系統] 子機碼,[ 原則 ] 子機碼會優先。

原則

登入位置: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies

DWORD 名稱: EnforceDirectoryChangeNotificationPermissionCheck

值日期: 1 (預設值為 0)

注意 若要關閉修正程式,請將 值數據 設為 0。

檔案系統

登錄位置: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem

DWORD 名稱: EnforceDirectoryChangeNotificationPermissionCheck

值日期: 1 (預設值為 0)

注意 若要關閉修正程式,請將 值數據 設為 0。

方法 2:PowerShell

若要啟用修正程式,請以系統管理員身分執行 PowerShell,然後在 [ 原則 ] 或 [文件系統 ] 子機碼中開啟修正程式。

原則

執行此指令:

Set-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\Policies” -Name “EnforceDirectoryChangeNotificationPermissionCheck” -Value 1 -Type Dword

檔案系統

執行此指令:

Set-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem” -Name “EnforceDirectoryChangeNotificationPermissionCheck” -Value 1 -Type DWord

若要停用修正程式,請以系統管理員身分執行 PowerShell,並關閉 [ 原則 ] 或 [文件系統 ] 子機碼中的修正程式。

原則

執行此指令:

Set-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\Policies” -Name “EnforceDirectoryChangeNotificationPermissionCheck” -Value 0 -Type DWord

檔案系統

執行此指令:

Set-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem” -Name “EnforceDirectoryChangeNotificationPermissionCheck” -Value 0 -Type DWord

需要更多協助嗎?

想要其他選項嗎?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。