---
title: "WEB-CK-001 Cookies Missing Secure, HttpOnly or SameSite"
canonical: https://openvapt.com/checks/WEB-CK-001.html
html: https://openvapt.com/checks/WEB-CK-001.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-CK-001 Cookies Missing Secure, HttpOnly or SameSite

Checks the security flags on cookies the home page sets.

- Domain: Web Apps
- Severity: Medium
- Control category: Web Application Security
- Fix effort: medium
- CVSS v3.1 vector: `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N`
- CIS Controls v8: 16.7
- NIST CSF 2.0: PR.PS-01
- CWE: CWE-614, CWE-1004, CWE-1275
- OWASP Top 10 2021: A05:2021, A07:2021
- OWASP ASVS 4.0.3: 3.4.1, 3.4.2, 3.4.3
- OWASP WSTG v4.2: WSTG-SESS-02
- NIST SP 800-53 Rev. 5: SC-8, SC-23

## Why It Matters

Without Secure, cookies leak over plain HTTP. Without HttpOnly, any XSS bug can steal sessions. Without SameSite, cross-site request forgery is easier.

## How It Detects

Inspects every Set-Cookie header on each site's home page for the Secure (HTTPS sites), HttpOnly and SameSite attributes. Cookies being deleted (expired or Max-Age 0) are ignored, and anti-CSRF cookies such as XSRF-TOKEN are not required to be HttpOnly because scripts must read them. Cookies set on redirect responses are evaluated too, because browsers store them. Cookie values are never recorded.

## How to Fix

PHP: session.cookie_secure=1, session.cookie_httponly=1, session.cookie_samesite=Lax in php.ini . Frameworks have equivalent settings (e.g. Laravel config/session.php). Use HttpOnly for every cookie JavaScript does not need to read.

## How to Verify

```
curl -sI https://<site>/ | grep -i set-cookie
```

## Learn the Theory

- [P5 Web Security Headers and Cookies](https://openvapt.com/academy/p5.md)

## References

- [OWASP Session Management Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html)
- [RFC 6265, HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc6265.html)

## Source Code

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

Run it: `openvapt scan --only WEB-CK-001`. Read it offline: `openvapt explain WEB-CK-001`.

---

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-CK-001.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
