Medium severityPHPInsecure ConfigurationMEDIUM confidence
Session Cookie Insecure Params
The session cookie is configured without Secure/HttpOnly (or with SameSite=None) (CWE-614/CWE-1004).
Standards mapping
- CWE
- CWE-614: Sensitive Cookie in HTTPS Session Without 'Secure' AttributeCWE-1004: Sensitive Cookie Without 'HttpOnly' Flag
- OWASP Top 10
- A05:2021 - Security Misconfiguration
- OWASP ASVS
- V3.4.1 (L1)V3.4.2 (L1)
Vulnerable vs. safe
Flagged by this check
session_set_cookie_params(["secure" => false, "httponly" => true]);Passes - the safe pattern
session_set_cookie_params(["secure" => true, "httponly" => true, "samesite" => "Lax"]);Why it matters & how to fix it
The session cookie is configured without Secure/HttpOnly (or with SameSite=None) (CWE-614/CWE-1004). This exposes the session ID to network sniffing and JavaScript theft. Set 'secure' => true, 'httponly' => true and 'samesite' => 'Lax' (or 'Strict') for session cookies.
References
Rule ID integsec-php-session-cookie-insecure-params - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentestRelated checks
- JavaScript / TypeScript - Insecure ConfigurationCORS Acao Wildcard Header
- JavaScript / TypeScript - Insecure ConfigurationCORS Wildcard Origin
- JavaScript / TypeScript - Insecure ConfigurationCORS Wildcard With Credentials
- JavaScript / TypeScript - Insecure ConfigurationCSRF Protection Disabled
- JavaScript / TypeScript - Insecure ConfigurationExpress Trust Proxy All
- JavaScript / TypeScript - Insecure ConfigurationExpress X Powered By Enabled