PT-2022-24868
CVE-2022-39284
·
Published
2022-10-06
·
Updated
2024-03-06
Description by
CVSS 3.1
2.6
LowMetricsAV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N
Name of the Vulnerable Software and Affected Versions
CodeIgniter versions prior to 4.2.7
Description
The issue arises when setting
$secure or $httponly value to true in ConfigCookie is not reflected in set cookie() or Response::setCookie(), resulting in cookie values being erroneously exposed to scripts. This vulnerability does not affect session cookies.Recommendations
For versions prior to 4.2.7, upgrade to v4.2.7 or later.
As a temporary workaround, consider specifying the options explicitly by setting
'secure' and 'httponly' to true in the cookie array.
Alternatively, construct Cookie objects to ensure secure cookie handling.
For example, specify the options explicitly:php
$cookie = [
'name' => $name,
'value' => $value,
'secure' => true,
'httponly' => true,
];
set cookie($cookie);
// or
$this->response->setCookie($cookie);Or use Cookie object:
php
use CodeIgniterCookieCookie;
$cookie = new Cookie($name, $value);
set cookie($cookie);
// or
$this->response->setCookie($cookie);Exploitability
Exploit
Fix
Impacts
Vendors
Affected products
Found an issue in the description? Have something to add? Feel free to write us 👾