{"id":"CVE-2022-35943","published":"2022-08-12T20:55:10Z","modified":"2025-04-22T17:42:18Z","title":"SameSite may allow cross-site request forgery (CSRF) protection to be bypassed","vendor":"codeigniter4","product":"shield","tier":"tail","description":{"text":"Shield is an authentication and authorization framework for CodeIgniter 4. This vulnerability may allow [SameSite Attackers](https://canitakeyoursubdomain.name/) to bypass the [CodeIgniter4 CSRF protection](https://codeigniter4.github.io/userguide/libraries/security.html) mechanism with CodeIgniter Shield. For this attack to succeed, the attacker must have direct (or indirect, e.g., XSS) control over a subdomain site (e.g., `https://a.example.com/`) of the target site (e.g., `http://example.com/`). Upgrade to **CodeIgniter v4.2.3 or later** and **Shield v1.0.0-beta.2 or later**. As a workaround: set `Config\\Security::$csrfProtection` to `'session,'`remove old session data right after login (immediately after ID and password match) and regenerate CSRF token right after login (immediately after ID and password match)","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00611,"percentile":0.50227,"provenance":"source"},"cwes":[{"id":"CWE-352","name":"Cross-Site Request Forgery"}],"references":[{"url":"https://github.com/codeigniter4/shield/security/advisories/GHSA-5hm8-vh6r-2cjq","tags":["x_refsource_CONFIRM"]},{"url":"https://codeigniter4.github.io/userguide/libraries/security.htm","tags":["x_refsource_MISC"]},{"url":"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite","tags":["x_refsource_MISC"]},{"url":"https://jub0bs.com/posts/2021-01-29-great-samesite-confusion","tags":["x_refsource_MISC"]}],"priority":{"score":14.2,"factors":[{"name":"EPSS percentile","points":10.05},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"codeigniter4","affectedVersions":[{"vendor":"codeigniter4","product":"shield","versions":["> 4.3.2, > v1.0.0-beta.2"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-22T15:45:07.423965Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"codeigniter4/shield","vulnerableRanges":[">=1.0.0-beta, <1.0.0-beta.2"],"patched":["1.0.0-beta.2"],"from":["GHSA-5hm8-vh6r-2cjq"],"provenance":"source"}],"summary":{"text":"The SameSite handling in CodeIgniter Shield, the authentication and authorization framework for CodeIgniter 4, allows the CSRF protection to be bypassed. Exploitation requires that the attacker control a subdomain of the target site, either directly or indirectly (for example through XSS), and that a user be induced to interact with the attack.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:40:48Z"},"euvd":{"id":"EUVD-2022-6486","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-codeigniter4-shield-cve-2022-35943","children":[{"from":"CVE-2022-35943","to":"CVE-2023-27580","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:codeigniter4/shield","fromFixed":"1.0.0-beta.2","toFixed":"1.0.0-beta.4","daysApart":213},{"kind":"same-code","provenance":"machine","files":["src/Authentication/Authenticators/Session.php"],"commits":["https://github.com/codeigniter4/shield/commit/342a368536678621998c3c41d276480cd14ec6c6","https://github.com/codeigniter4/shield/commit/ea9688dd01d100193d834117dbfc2cfabcf9ea0b"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2022-35943","published":"2022-08-12","fixed":"1.0.0-beta.2","kev":false},{"cve":"CVE-2023-27580","published":"2023-03-13","fixed":"1.0.0-beta.4","kev":false},{"cve":"CVE-2023-48707","published":"2023-11-24","fixed":"1.0.0-beta.8","kev":false},{"cve":"CVE-2023-48708","published":"2023-11-24","fixed":"1.0.0-beta.8","kev":false}],"package":"Packagist:codeigniter4/shield"}}