View all Worklets
WindowsWindows

Restrict External Access to SharePoint Central Administration to Mitigate CVE-2026-32201 on Windows

Blocks external connections to the SharePoint Central Administration port to mitigate CVE-2026-32201 while internal administrators keep access

Worklet Details

What the SharePoint Central Administration firewall Worklet does

This Automox Worklet™ adds a Windows Firewall rule that blocks external sources from SharePoint Central Administration, following CISA hardening guidance for five actively exploited SharePoint Server vulnerabilities: CVE-2026-32201, CVE-2026-45659, CVE-2026-56164, CVE-2026-55040, and CVE-2026-58644. The inbound block rule, Automox-CVE-2026-32201-SPCentralAdmin, covers the TCP port or ports in Central Administration's http and https bindings.

Central Administration has no default port, because the SharePoint configuration wizard picks one at random. The Worklet reads the port or ports from the http and https bindings of the IIS site SharePoint Central Administration v4 in applicationHost.config, so each server gets a rule for its own ports.

The rule covers all firewall profiles and matches only remote addresses outside private address space. Administrators who connect from loopback, link-local, RFC 1918, RFC 6598 shared, or IPv6 unique-local addresses keep access. The rule is defense in depth, and Microsoft's security updates fix the vulnerabilities themselves.

Why restrict external access to SharePoint Central Administration

Use this Worklet when SharePoint servers that host Central Administration are reachable from outside your network and you want the administration site closed to external sources. CISA's hardening guidance for CVE-2026-32201 and the four related SharePoint Server vulnerabilities recommends restricting external access to Central Administration.

Because the configuration wizard assigns a random port, one static port rule doesn't fit every farm. The Worklet reads each server's own bindings and builds the rule from them. Servers without SharePoint Server or a local Central Administration site stay unchanged, so you can target a broad Windows Server group with one policy.

How the Central Administration port block works

  1. Evaluation phase: Checks for SharePoint Server 2016, 2019, or Subscription Edition by looking for HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\16.0 in the 64-bit registry view. It then loads %SystemRoot%\System32\inetsrv\config\applicationHost.config, using the sysnative path when PowerShell runs as a 32-bit process. In that file, it looks for the SharePoint Central Administration v4 site. If SharePoint, the IIS configuration file, or the site is missing, the script logs NOT APPLICABLE and exits 0.

    Next, it collects the numeric ports from the site's http and https bindings and compares them with the http and https binding ports of every other IIS site. It confirms that the Windows Firewall service (MpsSvc) is running and reads each profile from the active policy store with Get-NetFirewallProfile. It logs a WARNING for each profile that is disabled or where Group Policy ignores local firewall rules.

    A shared port, a stopped or missing firewall service, or no profile that is both enabled and accepting local rules produces a WARNING and exit 0, with no remediation scheduled. The same goes for a registry, IIS configuration, binding, or firewall query the script can't read: it logs the reason and exits 0.

    Finally, it reads the Automox-CVE-2026-32201-SPCentralAdmin rule from the persistent store with Get-NetFirewallRule, Get-NetFirewallPortFilter, and Get-NetFirewallAddressFilter. The rule must be enabled, inbound, set to Block, on profile Any, and limited to TCP. Its local ports must equal the current Central Administration ports, and its remote addresses must equal the expected list.

    A missing rule or any mismatch logs NON-COMPLIANT and exits 1, which schedules remediation. A full match logs COMPLIANT and exits 0.

  2. Remediation phase: Runs the same applicability and state checks itself, so it changes nothing on servers without SharePoint Server or a local Central Administration site, even when you run remediation directly. On compliant and not-applicable servers, remediation exits 0 with no change. On a server with a shared port or an unusable firewall, it exits 1 with an ERROR that recommends restricting Central Administration at the network firewall. When it can't determine the state, it logs a WARNING and exits 0.

    On a non-compliant server, it writes rule-state.txt under %ProgramData%\amagent\WorkletCache\71352921-425a-5ccc-afea-ffc01952e504. The file records the time, the rule name, the ports, and whether the server already had a copy of the rule. The Worklet removes any out-of-date copy, then calls New-NetFirewallRule in the persistent store with the display name Automox - Restrict External Access to SharePoint Central Administration (CVE-2026-32201).

    The new rule is enabled, inbound, Block, TCP, and profile Any, with the Central Administration ports as its local ports. Its remote address list covers every IPv4 and IPv6 address except 127.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 169.254.0.0/16, 172.16.0.0/12, 192.168.0.0/16, ::, ::1, fc00::/7, and fe80::/10.

    After it creates the rule, the Worklet runs the evaluation checks again. It logs SUCCESS and exits 0 when the server reports compliant. It exits 1 when that verification fails or when writing the state file, removing the old rule, or creating the new one fails.

SharePoint Central Administration firewall rule requirements

  • Windows Server 2016, 2019, 2022, or 2025

  • SharePoint Server 2016, 2019, or Subscription Edition, which registers HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\16.0

  • Central Administration hosted on the server as the IIS site SharePoint Central Administration v4, with at least one http or https binding on a numeric port

  • Central Administration ports that no other IIS site on the server binds for http or https

  • PowerShell 5.1 or later

  • The Windows Firewall service (MpsSvc) running, with at least one profile enabled and not set by Group Policy to ignore local firewall rules

  • Administrator rights to create firewall rules and write under %ProgramData%, which the Automox agent's SYSTEM context provides

  • Optional $dryrun = $true, edited at the top of the policy's remediation code, to log the rule the Worklet would remove or create and the blocked ranges without changing the server

  • Optional $rollback = $true in the remediation code of a separate policy created from this Worklet for the same servers' group, to remove the rule and the state file. Rollback exits 0 when it removes the rule or finds none, and 1 when the rule query or removal fails.

  • A manual run for rollback. Evaluation exits 0 while the rule matches, so scheduled runs don't start remediation. First remove the target servers' group from the blocking policy, so its next scheduled run doesn't re-create the rule. Then run the rollback policy with Run Policy, which runs its remediation code directly.

Expected Central Administration access after remediation

After remediation, Windows Firewall holds Automox-CVE-2026-32201-SPCentralAdmin, an enabled inbound rule set to all profiles. It blocks TCP connections to the Central Administration port or ports from non-private IPv4 and IPv6 addresses. Administrators who connect from loopback, link-local, RFC 1918, RFC 6598, or IPv6 unique-local addresses reach Central Administration as before. To check a server, run Get-NetFirewallRule -Name Automox-CVE-2026-32201-SPCentralAdmin | Get-NetFirewallPortFilter and confirm the local ports match the Central Administration bindings.

Later evaluations exit 0 while the rule matches. If someone disables the rule or changes its direction, action, profile, protocol, local ports, or remote addresses, the next evaluation exits 1 and remediation rebuilds it. The same happens when Central Administration moves to a port that no other IIS site binds for http or https. Servers without SharePoint Server or a local Central Administration site log NOT APPLICABLE, and servers where another IIS site shares the port log a WARNING, with no change to either.

View in app

Consider Worklets your easy button

What's a Worklet?

An Automox Worklet™ is a Bash or PowerShell automation that takes action on Windows, macOS, and Linux endpoints at scale. It handles everything from configuration and software management to named-CVE mitigations deployed within hours of disclosure, including vulnerabilities that have no patch yet, are configuration-based, or that a vendor won't fix.

Every Automox-published Worklet is human-reviewed, and customers control where, when, and how it runs.

Mitigation at AI speed

Disclosure to mitigation in minutes or hours

Frontier-model AI is finding vulnerabilities faster than most teams can track, and most of what it finds isn't immediately patchable. Finding isn't fixing. Worklets turn discovery into action.

  • Search by CVE or browse the Mitigations category
  • Review the Worklet before you deploy it
  • FixNow for urgent exposure
  • Verify execution through Activity Log and Policy Results
Mitigating Vulnerabilities with Automox