CVE-2022-35943: CodeIgniter Shield Vulnerable to SameSite Attackers Bypassing the CSRF Protection
5.9
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.02964%
CWE
Published
8/18/2022
Updated
1/30/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
codeigniter4/shield | composer | = 1.0.0-beta | 1.0.0-beta.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from two key issues: 1) The Session authenticator's constructor lacked a check to enforce 'session' mode for CSRF protection. This allowed 'cookie' mode, which is susceptible to subdomain attacks due to cookie inheritance. 2) The login process
did not forcibly regenerate CSRF tokens when configuration disallowed regeneration, leaving stale tokens active. The patch introduced a security check in the constructor and added token regeneration in startLogin()
, directly addressing these flaws. Both functions
were critical points where insecure configurations and token management enabled the bypass.