Vulnerability library
Security checkMay 13, 2024

Session Cookie without HttpOnly Flag

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

The absence of the HttpOnly flag in session cookies allows client-side JavaScript to access them, which poses a security risk. Without the HttpOnly flag, session cookies are vulnerable to theft via Cross-Site Scripting (XSS) attacks, enabling attackers to hijack user sessions.

Test for Session Cookie Vulnerabilities with SmartScanner

Donwload FREE!

Recommendation

To mitigate the risk of session hijacking via XSS attacks, ensure all session cookies are set with the HttpOnly flag. This prevents client-side scripts from accessing them, enhancing the security of session management.

References

Could your website be exposed too?

SmartScanner can check your website for Session Cookie without HttpOnly Flag and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated May 13, 2024