# CVE-2022-39284: Secure or HttpOnly flag set in Config\Cookie is not reflected in Cookies issued in Codeigniter4

- Severity: Low 2.6 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.15%, higher than 67% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-10-06T00:00:00.000Z
- Modified: 2026-06-17T04:58:04.160Z
- Also known as: GHSA-745p-r637-7vvp, BIT-CODEIGNITER-2022-39284
- Weaknesses: CWE-665, CWE-732
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- codeigniter4 CodeIgniter4: < 4.2.7
- codeigniter4/framework (Packagist): before 4.2.7
- codeigniter codeigniter: from 4.0.0 before 4.2.7
- codeigniter (Bitnami): from 4.0.0 before 4.2.7

## Every score

- GitHub_M: CVSS:3.1 2.6 Low `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 2.6 Low `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N`
- NVD: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://github.com/codeigniter4/CodeIgniter4/issues/6540> (exploit, issue-tracking, third-party-advisory, web)
- <https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-745p-r637-7vvp> (mitigation, third-party-advisory, web)
- <https://github.com/codeigniter4/CodeIgniter4/pull/6544> (patch, third-party-advisory, web)
- <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://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)

## Sources

- CVE List: [CVE-2022-39284](https://www.cve.org/CVERecord?id=CVE-2022-39284), CVE Terms of Use, modified 2025-04-22
- GitHub Advisory Database: [GHSA-745p-r637-7vvp](https://github.com/advisories/GHSA-745p-r637-7vvp), CC-BY-4.0, modified 2024-02-16
- NVD: [CVE-2022-39284](https://nvd.nist.gov/vuln/detail/CVE-2022-39284), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-CODEIGNITER-2022-39284](https://osv.dev/vulnerability/BIT-CODEIGNITER-2022-39284), Apache-2.0, modified 2024-03-06

---

Page: https://cve.day/CVE-2022-39284 · Whole record: https://cve.day/CVE-2022-39284.json · Rebuilt by cve.day 2026-11-25T22:58:15.444Z
