Misconfigured HSTS

TLDR: A misconfigured HSTS (HTTP Strict Transport Security) policy can lead to vulnerabilities in enforcing secure connections, undermining its primary goal of protecting HTTPS traffic. If the policy is improperly set, such as using an insufficient max-age directive or failing to include the 'includeSubDomains' flag, attackers could exploit the gaps to perform man-in-the-middle attacks or downgrade attacks. These misconfigurations may also lead to mixed-content issues or unprotected subdomains, compromising the overall security of the web application.

https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security

In-depth consequences of misconfigured HSTS extend to usability and operational challenges. When users visit a site with improper settings, they may encounter inconsistent redirections or warnings about insecure content. For example, not preloading the domain in major browser HSTS preload lists may result in initial unencrypted requests being vulnerable. Additionally, misconfiguration could inadvertently block legitimate traffic if certain subdomains or services require non-HTTPS connections.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security

Proper implementation of HSTS requires a strategic and well-tested deployment. It involves setting adequate 'max-age' values (preferably in the range of months to years) and including all necessary directives, such as 'includeSubDomains' and 'preload', for comprehensive coverage. Administrators must thoroughly test the implementation to avoid disrupting user experience and ensuring compatibility with all dependent services and subdomains. By adhering to best practices and leveraging tools like Qualys SSL Labs for configuration analysis, developers can ensure robust protection against HTTPS downgrade attacks.

https://www.cisecurity.org/controls