EN, Change language
Englishالعربية
BH-125

Cookies are set with the Secure and HttpOnly flags.

The requirement

Cookies are set with the Secure and HttpOnly flags.

Why it matters to users

A session cookie without Secure can travel over an unencrypted connection, and without HttpOnly injected code can read it. An attacker can then take over the citizen's session and transactions.

How to fix it

Set every cookie your server sends with the Secure and HttpOnly flags, plus SameSite, in your server or framework settings. Then scan again.

How we measure it

Set-Cookie flags on the homepage response and on each sampled page's response; no cookie set counts as met.

Its official source

Related rules

Secure, HttpOnly cookies · Bahrain BH-125 | xfix