Cookie CookieHTTPOnly

A new cookie is created without the HttpOnly flag set. The HttpOnly flag is a directive to the browser to make sure that the cookie can not be red by malicious script. When a user is the target of a "Cross-Site Scripting", the attacker would benefit greatly from getting the session id for example.

IndexedPublic repositoryMediumMedium confidenceVerifiedLGPL-3.0-onlyKotlin
greprules fetch gitlab-sast-rules-lgpl-kotlin-cookie-rule-cookiehttponly --engine opengrep

Description

A new cookie is created without the HttpOnly flag set. The HttpOnly flag is a directive to the browser to make sure that the cookie can not be red by malicious script. When a user is the target of a "Cross-Site Scripting", the attacker would benefit greatly from getting the session id for example.