Free Cookie Security Checker
Audit cookies for HttpOnly, Secure, SameSite, and Partitioned attributes to stop session theft and cross-site leakage before attackers exploit them.
- HttpOnly & Secure flags
- SameSite settings
- Partitioned cookies

What you get for free
18 core security checks via this tool, passive scans, step-by-step remediation, security score on every result.
What Essential adds at $39/mo
+17 advanced checks, continuous monitoring, daily security score history, email alerts, GitHub SAST, board-ready PDFs, SOC 2 / ISO 27001 / PCI reports.
How to fix common failures
- Mark auth cookies as HttpOnly so they are never accessible to JS
- Set Secure on all cookies over HTTPS
- Use SameSite=Lax by default, and Strict for highly sensitive areas
What is cookie security?
Cookie security ensures sensitive cookies (like session tokens) are protected with HttpOnly, Secure, SameSite and, when needed, Partitioned attributes.
What this checker validates
- HttpOnly and Secure status on cookies
- SameSite=Lax/Strict for CSRF mitigation (or None with Secure)
- Partitioned attribute for third‑party contexts (CHIPS)
Across 7,440 recent scans, 31.9% have at least one cookie missing Secure, HttpOnly, or SameSite. Cookie attributes are still one of the most-overlooked checks.
Implementation examples
Once you've identified the gap, applying the fix is straightforward. Here are the three configurations developers reach for most often.
Nginx
# Rewrite Set-Cookie from upstream to add secure flags
proxy_cookie_flags ~ secure httponly samesite=lax;
# Or set a cookie directly with all attributes
add_header Set-Cookie "session=$cookie_session; Path=/; Secure; HttpOnly; SameSite=Lax" always;Apache
# Requires mod_headers
Header edit Set-Cookie ^(.*)$ "$1; Secure; HttpOnly; SameSite=Lax"
# Or for a specific cookie
Header always set Set-Cookie "session=abc123; Path=/; Secure; HttpOnly; SameSite=Strict"Node.js (Express)
import express from "express"
import session from "express-session"
const app = express()
app.use(
session({
secret: process.env.SESSION_SECRET!,
resave: false,
saveUninitialized: false,
cookie: {
httpOnly: true,
secure: true,
sameSite: "lax",
maxAge: 1000 * 60 * 60 * 24,
},
}),
)
// Or when setting a cookie manually
res.cookie("token", token, {
httpOnly: true,
secure: true,
sameSite: "lax",
path: "/",
})Tool-specific questions
Is SameSite=None safe?
When to use Partitioned?
Should JWTs be in cookies or storage?
Built for the engineers who already have enough to fix.
Real-time results
Comprehensive checks
Step-by-step fixes
More free checks, for the rest of your surface.
Complete Security Scan
Pre-Pentest Security Scan
Security Compliance Checker
WAF Checker
Security Headers Test
TLS/SSL Security Checker
Go deeper on the same topic.
Cookie Security
Insecure Cookies
Cookie Security Best Practices
Frequently asked.
What is Barrion and how does it enhance website security?
How safe is Barrion to use for security testing?
What types of security issues does Barrion identify?
What specific security checks does Barrion perform?
What is Barrion's smart crawling?
How often does Barrion perform security scans?
Is Barrion suitable for security testing of all business sizes?
How does Barrion handle data security and privacy during security testing?
What if I'm not satisfied with Barrion's security testing service?
How does Barrion help with SOC 2, ISO 27001, NIS2, and other compliance frameworks?
Anything else? Email contact@barrion.io.
Run a full report on your site.
Free first scan covers every check, no signup needed. Sign up to save the report and turn on continuous monitoring.