Azure App Service Windows .NET Framework 4.8 returns phpVersion 5.6 although PHP is not configured – security exposure and supported remediation?

Kishor kumar Reddy Akki 55 Reputation points
2026-10-28T16:31:14.61+00:00

Hello Microsoft App Service Team,

We are investigating a security concern affecting multiple Azure App Service (Windows) applications that host.NET Framework / ASP.NET 4.8 workloads.

These applications do not use PHP, and PHP is not explicitly configured in our Bicep or ARM templates.

In the Azure Portal, the affected Web Apps show:

Stack: .NET

.NET version: ASP.NET V4.8

However, querying the App Service configuration returns:

JSON

{

"linuxFxVersion": "",

"netFrameworkVersion": "v4.0",

"phpVersion": "5.6",

"windowsFxVersion": null

}

Additionally, from the Kudu console:

php -v returns PHP 5.6.40.

We have reproduced the phpVersion: "5.6" result across multiple Windows App Services, including both older and more recently deployed applications.

We have reviewed our Infrastructure-as-Code configuration and confirmed that:

  • PHP is not specified in the Bicep templates.
  • PHP is not specified in the older ARM templates.
  • The applications are explicitly configured for .NET Framework where a runtime is specified.
  • Azure Portal shows the Application Stack as .NET / ASP.NET V4.8.

Microsoft's current PHP App Service documentation states that PHP on Windows App Service reached end of support in November 2022 and that PHP is now supported only on App Service Linux. This makes the presence of the phpVersion: "5.6" configuration on these .NET-only Windows applications unclear to us.

Could the Azure App Service engineering team please clarify the following?

  1. Why is phpVersion: "5.6" being returned for a Windows App Service configured for .NET Framework 4.8 when PHP has never been configured by the customer?

Is 5.6 a legacy/default property retained by the Windows App Service platform, or does it mean PHP is actually enabled for the Web App?

  1. Does phpVersion: "5.6" cause PHP/FastCGI to be registered or enabled for incoming HTTP requests?

In particular, could a .php request sent to the application's public URL be processed by PHP even though the application's selected stack is .NET Framework?

  1. Does the presence of PHP 5.6.40 in Kudu and phpVersion: "5.6" expose a .NET-only Windows App Service to PHP vulnerabilities if the application itself contains no PHP code?

We would particularly like confirmation whether PHP must be actively invoked/configured for a PHP CVE to be applicable, or whether the platform-installed runtime itself can constitute an attack surface.

  1. Is PHP accessible/invokable through Kudu/SCM or another App Service management endpoint in a way that could create security exposure?
  2. What is Microsoft's supported recommendation for customers running only .NET Framework who see phpVersion: "5.6"?

Should the phpVersion property be cleared/changed, or should it be left unchanged because it is a platform-managed/legacy configuration?

  1. Is there a Microsoft-supported method to completely disable or remove the PHP runtime from a managed Windows App Service when PHP isn't required?

If removal isn't supported, is there a documented method for confirming that PHP cannot process externally supplied requests?

  1. Since PHP on Windows App Service reached end of support in November 2022, does Microsoft continue to apply security fixes/backports to the PHP 5.6.40 binary that remains available on Windows workers, or should this binary be considered unpatched/EOL?

We don't want to attempt to modify or remove a Microsoft-managed runtime from Kudu without confirmation of the supported remediation.

We are specifically looking for an authoritative App Service/Product Group clarification regarding security exposure and the supported mitigation for .NET-only Windows App Services, rather than guidance for applications that intentionally run PHP.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.

0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-10-28T16:32:36.3+00:00

    The supported action is to leave the platform PHP files and phpVersion value unchanged, verify whether IIS has an effective *.php handler, and restrict the SCM/Kudu endpoint; the public documentation does not establish that clearing the property or deleting the managed binary is supported.

    What the observations establish

    • phpVersion remains a defined Microsoft.Web/sites configuration property whose documented meaning is “Version of PHP.” The resource contract does not explain why 5.6 is returned for newly created .NET-only Windows apps, whether it is a legacy default, or whether it automatically installs a handler. ^1^
    • Running php -v in Kudu proves that the executable is reachable from the privileged Kudu command environment. Microsoft explicitly documents Kudu as an authenticated companion application that can run commands and manage IIS processes; this does not by itself prove that the public IIS site routes *.php requests to that executable. ^2^
    • IIS can process PHP only when a request path is mapped to FastCgiModule with a PHP CGI executable as its script processor. A FastCGI application definition alone does not automatically add that handler mapping. ^3^

    Consequently, the property value and Kudu binary are not sufficient evidence of public PHP execution. The decisive control is the effective IIS handler mapping.

    Verify public request handling without changing the runtime

    1. In the Azure portal, open App Service → Settings → Configuration → Path mappings.
    2. Inspect Handler mappings for an entry whose extension is *.php and whose script processor points to php-cgi.exe or another PHP executable. App Service documents these mappings as the mechanism that assigns extensions such as *.php to a script processor. ^4^
    3. Inspect the deployed site/wwwroot/web.config, including any child application or directory web.config files, for:
      • <handlers> entries matching *.php
      • FastCgiModule
      • a scriptProcessor containing php-cgi.exe
      • <fastCgi> PHP application definitions
    4. Check deployment scripts and site extensions for explicit PHP invocation. This matters because Kudu deployment automation can execute PHP tools such as Composer when configured to do so. ^5^
    5. If configuration inspection is inconclusive, reproduce the app in a non-production slot and request a uniquely named .php test resource. Use IIS Failed Request Tracing to identify the module that handled it; a trace attributed to FastCgiModule establishes PHP/FastCGI dispatch. ^6^

    Do not place a diagnostic PHP script in production. A missing PHP handler should result in PHP code not being executed, although the exact response can depend on other IIS/application routing rules.

    Kudu/SCM exposure

    Kudu command execution is a privileged management operation, not an anonymous application feature. Browser access through Microsoft Entra authentication requires a role containing Microsoft.Web/sites/publish/Action. ^2^

    Apply these controls:

    1. Disable SCM basic publishing authentication, retaining Microsoft Entra authentication:
         az resource update \
           --resource-group <resource-group> \
           --name scm \
           --namespace Microsoft.Web \
           --resource-type basicPublishingCredentialsPolicies \
           --parent sites/<app-name> \
           --set properties.allow=false
      
      Microsoft documents this as limiting SCM access to users registered with Microsoft Entra ID. ^7^
    2. Use least-privilege RBAC for Kudu access; avoid broad Owner or Contributor assignments where a narrower role suffices. ^2^
    3. Under App Service → Networking → Access restrictions, configure separate SCM site restrictions or select Use main site rules. App Service supports controlling Kudu/SCM independently from the public application. ^8^

    Removal, clearing, and servicing status

    PHP on Windows App Service reached end of support in November 2022; PHP is currently supported only on App Service Linux. ^9^

    However, the public documentation supplied here does not document:

    • phpVersion: "5.6" as a harmless legacy/default sentinel;
    • a supported “clear PHP” value for Windows App Service;
    • customer removal of the platform PHP binary;
    • whether that remaining PHP 5.6.40 binary receives security backports after Windows PHP support ended.

    App Service manages its OS and built-in application stacks and applies platform/runtime updates, but its patching documentation discusses automatic patching of supported language runtimes and does not specifically promise PHP 5.6 backports on Windows after retirement. ^10^

    Therefore:

    • Do not delete or replace files under the managed runtime directories.
    • Do not set an invented PHP version or use the obsolete Windows PHP configuration examples as remediation.
    • Remove only customer-controlled PHP handlers, PHP files, deployment scripts, or site extensions if discovered.
    • Open an Azure support request for a Product Group statement covering the unexplained default/property semantics, platform-level removal, and post-EOL binary servicing. Include the app resource IDs, regions, OS/plan details, configuration JSON, effective handler mappings, and a staging-slot request trace.

    References

    1. Microsoft.Web sites 2023-12-01 (deployment-language-arm-template)
    2. Kudu service overview
    3. FastCGI <fastCgi>
    4. Configure an App Service app
    5. Configure a PHP app in Azure App Service (platform-windows)
    6. Troubleshoot PHP errors with Failed Request Tracing
    7. Tutorial: Create a secure N-tier app in Azure App Service
    8. Set up Azure App Service access restrictions
    9. Create a PHP web app in Azure App Service (platform-windows)
    10. Azure App Service OS and runtime patching
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.