Support

Admin Tools

#38382 Insecure cookie setting: missing Secure flag

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by JR on Monday, 23 January 2023 03:36 CST

JR

Hello Akeeba,

Our client did a pentest on the website and there was one medium warning. Is this something we can set in .htaccess from Admin Tools?

Medium warning> Insecure cookie setting: missing Secure flag

Cookie name:

9013e9e1db4d18b884ca37383d7df276

Set-Cookie:

9013e9e1db4d18b884ca37383d7df276=1vp85c0q2t2r8g0t0g857c0n

mt; path=/; HttpOnly

 

Risk description:

Since the Secure flag is not set on the cookie, the browser will send it over an unencrypted channel (plain HTTP) if such a request is

made. Thus, the risk exists that an attacker will intercept the clear-text communication between the browser and the server and he will

steal the cookie of the user. If this is a session cookie, the attacker could gain unauthorized access to the victim's web session.

Recommendation:

Whenever a cookie contains sensitive information or is a session token, then it should always be passed using an encrypted channel.

Ensure that the secure flag is set for cookies containing such sensitive information.

References:

https://owasp.org/www-project-web-security-testing-guide/stable/4-Web_Application_Security_Testing/06-

Session_Management_Testing/02-Testing_for_Cookies_Attributes.html

Classification:

CWE : CWE-614

OWASP Top 10 - 2013 : A5 - Security Misconfiguration

OWASP Top 10 - 2017 : A6 - Security Misconfiguration

tampe125
Akeeba Staff

Hello,

please get inside Joomla Global Configuration and set the option Force HTTPS to Entire Site. That should set the correct flag to the cookie, too.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

JR

Thank you, will check that.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!