CVE-2022-39284
Secure or HttpOnly flag set in Config\Cookie is not reflected in Cookies issued in Codeigniter4
- Published
- Updated
- Reserved
- Assigned by
- GitHub_M
Description
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.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Low2.6 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N |
| NVDNVD · Modified | 3.1 | Medium4.3 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
- EPSS (exploitation in 30 days)
- 1.1% · top 34% of all CVEs (6 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Low 2.6.
Weakness
Affected products
- affected < 4.2.7
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Packagistcodeigniter4/frameworkGHSA-745p-r637-7vvp (opens in a new tab)
References (6)
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-745p-r637-7vvp (opens in a new tab)x_transferred
- https://github.com/codeigniter4/CodeIgniter4/issues/6540 (opens in a new tab)x_transferred
- https://github.com/codeigniter4/CodeIgniter4/pull/6544 (opens in a new tab)x_transferred
- https://codeigniter4.github.io/userguide/helpers/cookie_helper.html#set_cookie (opens in a new tab)x_transferred
- https://codeigniter4.github.io/userguide/outgoing/response.html#CodeIgniter%5CHTTP%5CResponse::setCookie (opens in a new tab)x_transferred
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies (opens in a new tab)x_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-745p-r637-7vvp (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2022-39284)Record last updated .