CVE-2022-39284
Secure or HttpOnly flag set in Config\Cookie is not reflected in Cookies issued in Codeigniter4
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
1Exploited in Wild
-Decision
Descriptions
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.
CodeIgniter es un framework web PHP full-stack. En versiones anteriores a 4.2.7 el valor "$secure" o "$httponly" de "true" en "Config\Cookie" no es reflejado en "set_cookie()" o "Response::setCookie()". Como resultado, los valores de las cookies son expuestas erróneamente a los scripts. Cabe destacar que esta vulnerabilidad no afecta a las cookies de sesión. Es recomendado a usuarios actualizar a versión 4.2.7 o posterior. A usuarios que no puedan actualizarse les es aconsejado que construyan manualmente sus cookies, ya sea al establecer las opciones en el código o construyendo objetos Cookie. Ejemplos de cada mitigación están disponibles en el enlace GHSA
CVSS Scores
SSVC
- Decision:-
Timeline
- 2022-09-02 CVE Reserved
- 2022-10-06 CVE Published
- 2024-04-28 EPSS Updated
- 2024-08-03 CVE Updated
- 2024-08-03 First Exploit
- ---------- Exploited in Wild
- ---------- KEV Due Date
CWE
- CWE-665: Improper Initialization
- CWE-732: Incorrect Permission Assignment for Critical Resource
CAPEC
References (6)
URL | Tag | Source |
---|---|---|
https://codeigniter4.github.io/userguide/helpers/cookie_helper.html#set_cookie | Technical Description | |
https://codeigniter4.github.io/userguide/outgoing/response.html#CodeIgniter%5CHTTP%5CResponse::setCookie | Technical Description | |
https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies | Technical Description | |
https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-745p-r637-7vvp | Mitigation |
URL | Date | SRC |
---|---|---|
https://github.com/codeigniter4/CodeIgniter4/issues/6540 | 2024-08-03 |
URL | Date | SRC |
---|---|---|
https://github.com/codeigniter4/CodeIgniter4/pull/6544 | 2023-07-11 |
URL | Date | SRC |
---|
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Codeigniter Search vendor "Codeigniter" | Codeigniter Search vendor "Codeigniter" for product "Codeigniter" | >= 4.0.0 < 4.2.7 Search vendor "Codeigniter" for product "Codeigniter" and version " >= 4.0.0 < 4.2.7" | - |
Affected
|