---
title: "WEB-HDR-004 Missing X-Content-Type-Options"
canonical: https://openvapt.com/checks/WEB-HDR-004.html
html: https://openvapt.com/checks/WEB-HDR-004.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-14
version: 0.1.0-alpha.6
---

# WEB-HDR-004 Missing X-Content-Type-Options

Checks that browsers are told not to guess (sniff) content types.

- Domain: Web Apps
- Severity: Low
- Control category: Web Application Security
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N`
- CIS Controls v8: 16.7
- NIST CSF 2.0: PR.PS-01
- CWE: CWE-430
- OWASP Top 10 2021: A05:2021
- OWASP ASVS 4.0.3: 14.4.4
- NIST SP 800-53 Rev. 5: CM-6

## Why It Matters

Without nosniff, a browser may execute an uploaded text or image file as script or HTML, enabling XSS through file uploads.

## How It Detects

Reads the X-Content-Type-Options header from each site's home page and checks that it is present with the value nosniff.

## How to Fix

Send  X-Content-Type-Options: nosniff  on every response (Apache: Header always set X-Content-Type-Options nosniff; nginx: add_header X-Content-Type-Options nosniff always;).

## How to Verify

```
curl -sI https://<site>/ | grep -i x-content-type-options
```

## Learn the Theory

- [P5 Web Security Headers and Cookies](https://openvapt.com/academy/p5.md)
- [A8 Tracing Findings to Security Requirements](https://openvapt.com/academy/a8.md)

## References

- [OWASP Secure Headers Project](https://owasp.org/projects/secure-headers-project)
- [MDN Web Docs, X-Content-Type-Options](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Content-Type-Options)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/web/headers.go

Run it: `openvapt scan --only WEB-HDR-004`. Read it offline: `openvapt explain WEB-HDR-004`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/WEB-HDR-004.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
