应用对象
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 DO_NOT_USE_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 ID:5058189

摘要

Windows 中存在一个漏洞,允许未经授权的用户查看他们无权访问的资源的完整文件路径。 当用户对父文件夹 具有FILE_LIST_DIRECTORY 访问权限并获取 目录更改通知时,可能会出现此漏洞。

有关此漏洞的详细信息,请参阅 CVE-2025-21197CVE-2025-27738

详细信息

此漏洞的修补程序包含在 2025 年 4 月 8 日或之后发布的 Windows 更新中。

此修补程序可应用于 NTFSReFS 卷,以防止此漏洞。 此修补程序在向未经授权的用户报告更改之前,对已更改的文件或文件夹的父文件夹执行FILE_LIST_DIRECTORY访问检查。 如果用户不拥有必要的权限,则会筛选掉更改通知,防止未经授权泄露文件路径。

默认情况下,此修补程序处于禁用状态,以防止任何意外的安全风险或应用程序中断。

若要启用此修补程序,可以在受影响的系统上设置注册表项值或组策略键值。 为此,请使用下列方法之一。

方法 1:注册表

在 Windows 注册表中,在 “策略”“文件系统 ”子项中打开修复程序。

谨慎 如果同时启用了 “策略”“FileSystem ”子项,则 “策略 ”子项优先。

策略

注册表位置: 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,并在 “策略”“FileSystem ”子项中打开修复程序。

策略

运行以下命令:

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,并在 “策略”“FileSystem ”子项中关闭修复。

策略

运行以下命令:

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

需要更多帮助?

需要更多选项?

了解订阅权益、浏览培训课程、了解如何保护设备等。