Permissive cookie configuration
Overview
Rule ID:
java_lang_permissive_cookie_config
Applicable Languages: Java
Weakness ID: CWE-693
Description
Overly permissive cookie settings can make your application vulnerable to security risks, including unauthorized access and exploits.
Remediation Guidelines
Avoid setting the cookie's max age to -1, as this causes the cookie to persist until the browser session ends, posing a security risk.
Avoid setting the cookie's path to "/", which makes the cookie accessible to all paths in the domain and increases security risks.
Instead, set a limited maximum age for cookies to control their lifespan effectively.
Restrict the cookie's path to specific parts of your application to enhance security by limiting its exposure.
References
Configuration
To omit this rule during a scan, and to provide you with continuous 24/7 code-level scanning, you can employ our SAST TOOL
Last updated