Objective
Verify that HTTP security controls appropriate to the application's architecture are correctly implemented and that response headers do not unnecessarily expose platform information.
Security-related HTTP response headers allow an application or web server to communicate security policies to capable user agents.
This procedure focuses on verifying the effective HTTP response behavior. The presence of a header alone is not sufficient to determine whether the associated security control is correctly configured.
Scope
Review security-relevant response headers applicable to the target application.
Content-Security-Policy
Defines browser-enforced restrictions on content sources and execution contexts.
Strict-Transport-Security
Instructs supporting browsers to use HTTPS for the applicable host.
X-Content-Type-Options
Helps prevent MIME-type sniffing when configured appropriately.
Referrer-Policy
Controls the amount of referrer information sent with requests.
Permissions-Policy
Controls access to supported browser features according to application requirements.
Set-Cookie
Session and authentication cookies should use appropriate security attributes.
Server / X-Powered-By
Review unnecessary technology disclosure in response headers.
Cache-Control
Review caching behavior for responses containing sensitive information.
Do not require every header on every application. Security controls should be selected according to the application's functionality, browser behavior, authentication model and deployment architecture.
Prerequisites
| Authorization | Confirm authorization to assess the target application. |
|---|---|
| HTTPS configuration | Determine whether HTTPS is required for the application. |
| Application architecture | Understand the frontend, APIs, authentication mechanisms and third-party integrations. |
| Browser compatibility | Identify any legitimate browser requirements that affect policy design. |
Methodology
Assess both the declared configuration and the effective response received by a client.
| Method | Purpose |
|---|---|
| HTTP response inspection | Identify headers actually returned by the application. |
| Configuration review | Determine where the header policy is defined. |
| Policy analysis | Determine whether the configured policy matches application requirements. |
| Browser verification | Confirm practical behavior where browser-enforced controls are involved. |
Test procedure
Review more than the homepage. Security headers can differ between application routes, APIs, authentication endpoints, static resources and error responses.
Header-specific review
Content-Security-Policy
Determine whether a Content Security Policy is appropriate and whether its directives are consistent with the application's actual resource requirements.
Content-Security-Policy:
default-src 'self';
object-src 'none';
base-uri 'self';
The example is intentionally restrictive and illustrative. Do not copy it blindly into production. A CSP must be designed around the application's legitimate scripts, styles, images, frames and external services.
Strict-Transport-Security
Where HTTPS is consistently deployed and the policy is appropriate for the host, verify that HSTS is configured deliberately.
Strict-Transport-Security:
max-age=31536000
Do not enable aggressive HSTS settings without understanding the application's domain structure, subdomains and HTTPS readiness. An inappropriate policy can make legitimate services inaccessible.
Additional controls
| Control | Review question |
|---|---|
| X-Content-Type-Options | Is MIME sniffing protection appropriately configured for relevant responses? |
| Referrer-Policy | Does the policy prevent unnecessary disclosure of URL information? |
| Permissions-Policy | Are unnecessary browser capabilities restricted? |
| Cookies | Are authentication and session cookies appropriately protected with attributes such as Secure, HttpOnly and SameSite? |
| Technology disclosure | Are unnecessary Server or framework identification headers exposed? |
| Caching | Are sensitive responses protected against inappropriate caching? |
Expected result
Applicable HTTP security controls are intentionally configured, their effective behavior matches the application's security requirements, and unnecessary technology disclosure is minimized.
A missing header should not automatically be classified as a vulnerability. The tester should establish the security requirement, applicability and resulting risk.
Failure criteria
Consider the control ineffective when a confirmed configuration weakness creates a relevant security exposure.
A sensitive authenticated response is configured with caching behavior that permits storage where the application's security requirements require the response to remain private.
Remediation
Define HTTP security policies centrally where practical, then apply them consistently across the application and supporting infrastructure.
Recommended approach
- Establish the security requirements for each application class and response type.
- Define the required HTTP security headers.
- Configure policies at the most appropriate layer, such as the application, reverse proxy or web server.
- Remove unnecessary technology disclosure.
- Apply secure cookie attributes to authentication and session cookies.
- Protect sensitive responses against inappropriate caching.
- Test policy compatibility with legitimate application functionality.
- Include header verification in deployment testing.
Example reverse-proxy configuration
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy
"strict-origin-when-cross-origin" always;
add_header Content-Security-Policy
"default-src 'self'; object-src 'none';"
always;
This configuration is illustrative rather than a universal production baseline. Policy values must be reviewed against the actual application architecture.
Verification
Applicable controls are correctly implemented and verified through effective responses.
The identified security weakness remains present after remediation.
The required response or verification condition could not be evaluated.
Evidence requirements
Do not publish session identifiers, authorization tokens, private URLs, credentials or other sensitive information in evidence.
Classification
| WebOTG procedure | WebOTG-SM-003 |
|---|---|
| OWASP category | A02:2025 — Security Misconfiguration |
| Procedure type | HTTP security control review |
| Assessment result | PASS / FAIL / NOT TESTED |
| Finding severity | Determine from the confirmed security impact, affected data, exploitability and application context. |
WebOTG-SM-003 is a WebOTG-defined verification procedure. The identifier is not an OWASP-defined test identifier.
References
| Source | Relevance |
|---|---|
| OWASP Top 10:2025 — A02 | Security Misconfiguration category. |
| OWASP Web Security Testing Guide | Testing methodology for configuration and deployment controls. |
| OWASP ASVS | Application security verification requirements. |
| MDN Web Docs | Browser behavior and HTTP security header reference. |
WebOTG should maintain reference URLs, source versions and review dates centrally through its content-management system. This allows references to be updated without modifying the procedure template.