CVE-2022-39284
What it is
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.
At a glance
- Exploitability
- Can be exploited over the network with a low-privilege account, but needs a user to act. Limited direct impact.
- Exploit odds
- 1.1% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 1.1% in the next 30 days (EPSS).
- Severity: 2.6 LOW (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 1.1% · EPSS, next 30 days
- Weakness
- CWE-665
- Record status
- Modified
Affected
- Codeigniter < 4.2.7
Attack profile CVSS 3.1 · 2.6
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- Low
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
Raw vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2022-39284.md and follow it. Check whether this project is affected by CVE-2022-39284. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/codeigniter4/CodeIgniter4/pull/6544
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-745p-r637-7vvp
- https://github.com/codeigniter4/CodeIgniter4/pull/6544
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-745p-r637-7vvp
References
- https://codeigniter4.github.io/userguide/helpers/cookie_helper.html#set_cookie
- https://codeigniter4.github.io/userguide/outgoing/response.html#CodeIgniter%5CHTTP%5CResponse::setCookie
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies
- https://github.com/codeigniter4/CodeIgniter4/issues/6540
- https://github.com/codeigniter4/CodeIgniter4/pull/6544
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-745p-r637-7vvp
- https://codeigniter4.github.io/userguide/helpers/cookie_helper.html#set_cookie
- https://codeigniter4.github.io/userguide/outgoing/response.html#CodeIgniter%5CHTTP%5CResponse::setCookie
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies
- https://github.com/codeigniter4/CodeIgniter4/issues/6540
- https://github.com/codeigniter4/CodeIgniter4/pull/6544
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-745p-r637-7vvp