CVE-2022-35943
HIGH 8.8CVSS 3.1CodeIgniter Shield Vulnerable to SameSite Attackers Bypassing the CSRF Protection
Shield is an authentication and authorization framework for CodeIgniter 4. This vulnerability may allow SameSite Attackers to bypass the CodeIgniter4 CSRF protection 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)
- Published
- 12 Aug 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-352
- Also known as
- BIT-codeigniter-2022-35943GHSA-5hm8-vh6r-2cjq
- Sources
- NVDJSONOSV GHSA-5hm8-vh6r-2cjqJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | codeigniter | codeignitercpe:2.3:a:codeigniter:codeigniter:*:*:*:*:*:*:*:* |
< 4.2.3 | 4.2.3 |
| NVD | codeigniter | shieldcpe:2.3:a:codeigniter:shield:1.0.0:beta:*:*:*:*:*:* |
= 1.0.0 | |
| OSV | Packagist | codeigniter4/shield | >= 1.0.0-beta, < 1.0.0-beta.2 | 1.0.0-beta.2 |
References
- https://codeigniter4.github.io/userguide/libraries/security.htm · Broken Link, WEB
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite · Third Party Advisory, WEB
- https://github.com/codeigniter4/shield/security/advisories/GHSA-5hm8-vh6r-2cjq · Exploit, Mitigation, Third Party Advisory, WEB
- https://jub0bs.com/posts/2021-01-29-great-samesite-confusion · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-35943 · ADVISORY
- https://github.com/codeigniter4/shield/commit/342a368536678621998c3c41d276480cd14ec6c6 · WEB
- https://github.com/codeigniter4/shield · PACKAGE
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 12 Aug 2022)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 18 Aug 2022)