CVE-2022-39284
MEDIUM 4.3CVSS 3.1Codeigniter4's Secure or HttpOnly flag set in Config\Cookie is not reflected in Cookies issued
CodeIgniter is a PHP full-stack web framework. In versions prior to 4.2.7 setting $secure or $httponly value to true in Config\Cookie is not reflected in set_cookie() or Response::setCookie(). As a result cookie values are erroneously exposed to scripts. It should be noted that this vulnerability does not affect session cookies. Users are advised to upgrade to v4.2.7 or later. Users unable to upgrade are advised to manually construct their cookies either by setting the options in code or by constructing Cookie objects. Examples of each workaround are available in the linked GHSA.
- Published
- 6 Oct 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-665CWE-732
- Also known as
- BIT-codeigniter-2022-39284GHSA-745p-r637-7vvp
- Sources
- NVDJSONOSV GHSA-745p-r637-7vvpJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 4.3 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | LOW 2.6 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | LOW 2.6 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | codeigniter | codeignitercpe:2.3:a:codeigniter:codeigniter:*:*:*:*:*:*:*:* |
>= 4.0.0, < 4.2.7 | 4.2.7 |
| OSV | Packagist | codeigniter4/framework | < 4.2.7 | 4.2.7 |
References
- https://codeigniter4.github.io/userguide/helpers/cookie_helper.html#set_cookie · Technical Description, Third Party Advisory, WEB
- https://codeigniter4.github.io/userguide/outgoing/response.html#CodeIgniter%5CHTTP%5CResponse::setCookie · Technical Description, Third Party Advisory, WEB
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies · Technical Description, Third Party Advisory, WEB
- https://github.com/codeigniter4/CodeIgniter4/issues/6540 · Exploit, Issue Tracking, Third Party Advisory, WEB
- https://github.com/codeigniter4/CodeIgniter4/pull/6544 · Patch, Third Party Advisory, WEB
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-745p-r637-7vvp · Mitigation, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-39284 · ADVISORY
- https://github.com/FriendsOfPHP/security-advisories/blob/master/codeigniter4/framework/CVE-2022-39284.yaml · WEB
- https://github.com/codeigniter4/CodeIgniter4 · PACKAGE
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 6 Oct 2022)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 6 Oct 2022)