CVE-2022-35943: CodeIgniter Shield - Cross Site Request Forgery
- Cve: CVE-2022-35943
- Name: CodeIgniter Shield - Cross Site Request Forgery
- Description: 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)
- Impact: Attackers controlling a subdomain can bypass CSRF protections, potentially leading to unauthorized actions on behalf of users.
- Remediation: 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 after login, and regenerate CSRF token after login.
- Vulnerability type: cross_site_request_forgery
- Requirement type: user_interaction
- Requirements: Attacker must control a subdomain of the target site
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Epss score: 0.00611
- Epss percentile: 0.50234
- Assignee: [email protected]
- Published at: 2022-08-12T21:15:07Z
- Age in days: 1565
- Modified at: 2026-06-17T04:52:34Z
- Patch available: yes
- Public exploits total: 1
- References total: 3
- Products total: 2
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2022-35943
- Nvd status: modified
- Checked, none or zero: vulnerability impact, known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: hackerone
Cwe
| Id | Name |
|---|---|
| CWE-352 | Cross-Site Request Forgery |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://github.com/codeigniter4/shield/security/advisories/GHSA-5hm8-vh6r-2cjq | nvd | 2022-08-12 |
References
Same in every row:
- Source: nvd
| Url | Tags |
|---|---|
| https://github.com/codeigniter4/shield/security/advisories/GHSA-5hm8-vh6r-2cjq | Exploit, Mitigation, Third Party Advisory |
| https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite | Third Party Advisory |
| https://jub0bs.com/posts/2021-01-29-great-samesite-confusion | Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| codeigniter:codeigniter | < 4.2.3 | no | nvd | /v1/products/codeigniter/codeigniter |
| codeigniter:shield | = 1.0.0 beta | no | nvd | /v1/products/codeigniter/shield |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| codeigniter4/shield | commit, package, security_advisory | yes | /v1/repositories/codeigniter4/shield |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2022-08-12
- Remote: yes
- Exposed hosts: 2774
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports