Unencrypted HTTP Service

The web service is offered over plain HTTP, so anyone on the network path can read and alter its traffic, including credentials and session cookies.

SeverityMedium
CVSS 3.14.8 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N Open in the calculator
CVSS 4.06.3 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/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

The web service accepts connections over plain HTTP and serves its content without Transport Layer Security (TLS). Everything exchanged between a user's browser and the server, including credentials, session cookies, form data and the pages themselves, crosses the network unencrypted and without any check that it has not been altered on the way.

An attacker with a position on the network path between users and the server, such as on a shared or public wireless network, a compromised router or an intermediate provider, can read all of it, including user names, passwords and session cookies, and use them to take over accounts. The attacker can also change content in transit, for example injecting script into pages, altering downloads, or rewriting links and form destinations, and users have no way to notice. The impact is greatest where the service handles logins, personal data or administrative functions; a service that only publishes public information without a login is affected mainly through the alteration of its content.

The weakness takes two main forms. In the first, the service is only available over HTTP. In the second, HTTPS is available but the same content is also served over HTTP rather than the HTTP listener redirecting every request to HTTPS, so users who type the address without a scheme, follow an old link or use a bookmark carry on in cleartext. A partial form is an HTTP listener that redirects some paths but still serves others, such as API endpoints, static files or legacy pages.

The issue is confirmed by requesting the service with an http:// address and observing that content is returned rather than a redirect to HTTPS, and by capturing traffic to show that it is readable. Browsers label such pages as not secure, and scanners report the service as unencrypted or, where a login form is involved, as sending credentials in cleartext.

Remediation

Serve the service only over HTTPS:

  • Obtain a certificate from a publicly trusted certificate authority, using automated issuance and renewal (for example through the ACME protocol) where possible, and configure the service to accept TLS 1.2 and TLS 1.3 only.
  • Configure the HTTP listener to answer every request with a permanent redirect (301 or 308) to the same path over HTTPS and to serve no content itself, or close the HTTP port where nothing needs it.
  • Once the whole site works over HTTPS, send the Strict-Transport-Security header so that browsers stop making HTTP requests to it, and mark cookies with the Secure attribute.
  • Update links, redirects, API clients and integrations so that they use https:// addresses directly.
nginx: server { listen 80; return 301 https://$host$request_uri; } Apache (virtual host on port 80, mod_rewrite): RewriteEngine On RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

On IIS, use a URL Rewrite rule to redirect HTTP requests to HTTPS. Confirm the fix by requesting several paths over http:// and checking that each returns a redirect to the same path over HTTPS and that no content is served in cleartext.

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 Web Applications Findings

Every Web Applications finding