Microsoft releases “instant recovery” script for inetpub

Following the April 2025 Patch Tuesday updates, users began noticing a new and mysterious folder “inetpub” on the C: drive. The folder appeared empty and many assumed it could be malicious. So they proceeded to delete the folder.

However, Microsoft later confirmed that this folder was indeed part of the April update, and it was a fix for the CVE-2025-21204 vulnerability.

See more articles from iGuRu.gr when you search for news on Google.

Shortly after, a security researcher found that the interpub folder could help attackers permanently block Windows security updates, although, according to the company, this vulnerability is currently categorized as “moderate” severity, which does not require an immediate fix.

So Microsoft insists that the inetpub folder should not be deleted “regardless of whether Internet Information Services (IIS) is active” on your computer or not.

The company even released a new PowerShell script to restore the folder in case you deleted it, stating that “immediate recovery” is required.

Microsoft states:

“For systems with KB5055528 installed but the %systemroot%\inetpub directory deleted, immediate recovery is required. If the inetpub directory has been deleted, you must run the recovery script Set-InetpubFolderAcl.ps1.

This script:

  • It will recreate the inetpub directory if it has been deleted.
  • It will ensure that directory permissions are set correctly to prevent unauthorized access and potential vulnerabilities related to CVE-2025-21204.
  • Will update the ACLs for the DeviceHealthAttestation directory, if present. This directory was created in some Server versions since the February 2025 security updates. The script will update the ACLs for the DeviceHealthAttestation directory to ensure it is secure.”

To download the script, you need to visit the Microsoft PowerShell Gallery page . The script must be run with administrator privileges. The page also provides some additional instructions, if you need them.


Google preferences

Leave a Comment

Your email address will not be published. Required fields are marked *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).