Join our Newsletter — 33% off our NHI Course
Home› FAQ› Cyber Security› What are the signs that CSP and HSTS…
Cyber Security

What are the signs that CSP and HSTS controls are being misapplied?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated September 25, 2026 Domain: Cyber Security

The usual signs are missing security headers, weak or incomplete CSP directives, and teams postponing header work until late in development because it breaks existing page behavior. Another warning is relying on manual fixes instead of continuous monitoring. If browser-based attacks still succeed, the controls are probably too loose or inconsistently deployed.

How to Tell When CSP and HSTS Are Being Misapplied

The clearest signs are implementation gaps, brittle policies, and controls that look present on paper but do not reliably change browser behaviour. CSP and HSTS are easy to overstate in documentation and easy to underdeliver in production, especially when teams add them late, scope them inconsistently, or treat them as one-time headers instead of enforced security rules.

What Misapplication Looks Like in Practice

Misapplied CSP usually shows up as policies that are too permissive to stop real browser abuse, or so broken that teams quietly relax them until they no longer constrain execution meaningfully. Common patterns include broad wildcard allowances, repeated use of unsafe-inline or unsafe-eval, missing object-src or frame-ancestors protections, and policies that differ across routes, subdomains, or environments.

HSTS misapplication is usually easier to spot because the header either is not sent consistently or is deployed in a way that gives a false sense of coverage. A weak rollout often means the site still serves plain HTTP, redirects happen after first contact rather than before it, or the policy is not set long enough to resist downgrade and cookie-stripping behaviours.

The practical test is whether the browser is actually constrained the way the team expects. If scripts still execute from untrusted locations, if pages can be framed when they should not be, if HTTP remains reachable, or if header presence varies by deployment path, the controls are not being applied as durable protections. For web verification, teams usually validate these behaviours with W3C specifications in mind and then confirm implementation with the OWASP Web Security Testing Guide.

Operational Warning Signs Security Teams Should Watch

One warning sign is when header work is repeatedly deferred because it breaks existing application behaviour. That usually means security is being layered on top of unsafe assumptions in the frontend, rather than the application being engineered to tolerate strict browser policy. Another warning sign is manual drift, where the intended policy exists in one environment or template but not in every deployment target.

Another clue is that teams can explain the policy but cannot prove it. If there is no routine check for response headers, no regression test for content sources, and no monitored evidence that the policy is still present after releases, the control is likely informational rather than operational. Browser-based attacks succeeding despite “having CSP and HSTS” often points to uneven rollout, exceptions that were never retired, or a policy that was reduced to accommodate legacy code.

For control alignment, the relevant expectations are reflected in NIST SP 800-53 Rev 5 Security and Privacy Controls, CIS Controls v8, and ISO/IEC 27001:2022 Information Security Management, especially where secure configuration, monitoring, and change control need to be demonstrable rather than assumed.

Risk and Threat Considerations

Misapplied CSP and HSTS create a misleading trust boundary in the browser. That weakens defences against script injection, clickjacking, SSL stripping, mixed-content exposure, and policy bypass through inconsistent deployment, so the organisation may believe a control is active when the effective protection is partial or absent.

Failure mechanism: the browser accepts unsafe script sources, allows framing or downgraded transport, or sees different headers across pages and environments, which leaves exploitable gaps in enforcement.

Impact: attackers can preserve execution paths that should have been blocked, increase the chance of session compromise or content injection, and bypass the very protections the headers were supposed to provide.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5, CIS Controls v8 and OWASP ASVS set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5CM-2 — Baseline ConfigurationCSP and HSTS depend on secure baseline configuration across web responses.
CM-6 — Configuration SettingsMisapplied browser controls are configuration failures that require controlled settings.
SI-10 — Information Input ValidationEffective CSP reduces browser-executed injection paths that input validation alone may miss.
Recommendation — Define and enforce secure header baselines across all production web endpoints. Standardize CSP and HSTS settings and prevent ad hoc weakening in deployments. Combine input validation with CSP to reduce exploitability of browser content injection.
CIS Controls v8CIS-4 — Secure Configuration of Enterprise Assets and SoftwareHeader deployment is a secure-configuration problem across web assets.
CIS-16 — Application Software SecurityCSP is an application security control that should be verified during release.
Recommendation — Audit web assets for consistent secure-header configuration and drift. Test CSP and HSTS behaviour as part of application security validation.
ISO/IEC 27001:2022A.8.9 — Configuration managementCSP and HSTS must be governed as controlled configuration settings.
A.8.15 — LoggingHeader drift and policy bypass are easier to spot with operational logging and checks.
A.8.20 — Network securityHSTS is a transport hardening measure that supports secure web communication.
Recommendation — Manage security headers through controlled configuration and change approval. Log and monitor header presence so regressions are detected quickly. Enforce secure transport settings to prevent downgrade and mixed-content exposure.
OWASP ASVSV3 — Web Frontend SecurityCSP and framing restrictions are frontend security controls directly tied to this issue.
V12 — Secure CommunicationHSTS directly hardens browser-to-site transport security.
Recommendation — Verify frontend security controls that constrain script execution and framing. Verify secure transport requirements, including consistent HSTS deployment.

Practitioner Guidance

What to verify: confirm the same CSP and HSTS headers are present on every relevant response, including error pages, redirects, and authenticated routes. A policy that is strong only on the homepage is not a trustworthy control.

Common mistake: relaxing CSP until it merely documents current behaviour. That approach preserves compatibility at the cost of security, so the policy stops being a constraint and becomes a description of existing risk.

Decision rule: if the policy still allows inline execution, broad third-party script loading, or HTTP reachability, treat the control as incomplete and prioritise hardening before declaring the browser surface protected.

Practitioner takeaway: CSP and HSTS are effective only when they are consistent, testable, and enforced everywhere users actually browse, not when they exist as partially deployed headers that teams hope are sufficient.

Deepen Your Knowledge

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

    NHIMG Editorial Note
    Reviewed and updated by the NHIMG editorial team on September 25, 2026.
    NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org