App Service Accepts Unencrypted HTTP

The App Service app serves content over plain HTTP instead of redirecting to HTTPS, so its traffic can be read or altered by anyone positioned on the network path.

SeverityMedium
CVSS 3.14.2 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N Open in the calculator
CVSS 4.02.3 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-319: Cleartext Transmission of Sensitive Information
OWASP Top 10A04:2025 Cryptographic Failures
MITRE ATT&CKT1557 Adversary-in-the-Middle, T1040 Network Sniffing
CategoryCryptographic Failures

Description

Azure App Service apps, including function apps and deployment slots, answer on both HTTP and HTTPS unless the HTTPS Only setting is enabled, in which case HTTP requests are redirected to HTTPS. The finding applies where HTTPS Only is off, so pages, API responses, form submissions and cookies travel unencrypted whenever a user or client follows an http:// link, types the address without a scheme, or is configured with an HTTP address. It applies to the default azurewebsites.net host name and to any custom domains.

An attacker able to observe or intercept the traffic, for example on a shared or untrusted Wi-Fi network or through a compromised network device, can read data sent over HTTP, including session cookies that lack the Secure attribute, credentials submitted through forms and personal data in responses. They can also alter responses to inject malicious script or redirect users, and can keep users who start on HTTP from ever reaching the HTTPS site. The attack needs a position on the network path and a user or client that uses HTTP, so the impact is lower for APIs whose clients are configured with HTTPS addresses only. The redirect alone does not add an HTTP Strict Transport Security (HSTS) header, so even with HTTPS Only enabled a browser's first request can still be made over HTTP unless the application itself sends HSTS.

The weakness is identified by requesting the app over HTTP and observing that content is returned rather than a redirect to HTTPS, and confirmed in the app's configuration, where the httpsOnly property is false. Related settings are usually reviewed at the same time: the minimum TLS version for HTTPS connections, and the FTP state, where All allowed lets deployment credentials and files be sent over unencrypted FTP.

Remediation

  • Enable HTTPS Only on every app and deployment slot, so that HTTP requests are redirected to HTTPS.
  • Set the minimum TLS version to 1.2 or higher.
  • Set the FTP state to FTPS only or, preferably, Disabled, and deploy through pipelines that use authenticated HTTPS endpoints.
  • Send an HSTS header from the application, for example with app.UseHsts() in ASP.NET Core, once every page and subdomain is confirmed to work over HTTPS.
  • Bind a valid certificate to each custom domain, for example an App Service managed certificate, so that HTTPS works on every host name.
  • Prevent recurrence with an Azure Policy assignment that audits or denies apps without HTTPS Only, and set the property in deployment templates.
az webapp update --resource-group "$RG" --name "$APP" --https-only true az webapp config set --resource-group "$RG" --name "$APP" --min-tls-version 1.2 --ftps-state Disabled

Confirm the fix by requesting the app over HTTP, expecting a redirect to HTTPS, and by checking that HTTPS responses include a Strict-Transport-Security header.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Azure and Microsoft 365 Findings

Every Azure and Microsoft 365 finding