The session.cookie_httponly is used to block cookie access to the Javascript. If this setting is disabled, the Javascript can access and make changes to the session cookies. There are many servers that has a disabled session.cookie_httponly. This vulnerability allows access to session cookie to the malicious JavaScript code by the attacker. An enabled session.cookie_httponly setting prevents JavaScript injection.
Example
The below code is an example of session.cookie_httponly
Impact
The impact include:-
Cross-Site Request Forgery
Possible manipulation of sensitive information
Possible leakage of sensitive information
The attacker will gain administrator access to the web application
Mitigation / Precaution
This vulnerability can be fixed by:-
Enabling session.cookie_httponly.
Using CSRF protection token.
Automated human-like penetration testing for your web apps & APIs
Teams using Beagle Security are set up in minutes, embrace release-based CI/CD security testing and save up to 65% with timely remediation of vulnerabilities. Sign up for a free account to see what it can do for you.