CVE-2022-35943 json
SameSite may allow cross-site request forgery (CSRF) protection to be bypassed
published 2022-08-12 4 y ago modified 2026-06-17 4 mo ago also BIT-codeigniter-2022-35943 , EUVD-2022-6486 , GHSA-5hm8-vh6r-2cjq
- cvss
- 5.9
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 49%
- public exploits
- 0
- none known
Summary
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)
Patch / fix
- packagist codeigniter4/shield 1.0.0-beta.2
- bitnami codeigniter 4.2.3
- codeigniter codeigniter 4.2.3
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 18 mo ago
Exploit prediction
0.61% chance of exploitation in the next 30 days, higher than 49% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/codeigniter4/shield/security/advisories/GHSA-5hm8-vh6r-2cjq referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L |
| GitHub | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L |
| NVD | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | codeigniter4/shield | >=1.0.0-beta, <1.0.0-beta.2 |
1.0.0-beta.2 |
| bitnami | codeigniter | <4.2.3 |
4.2.3 |
Affected products
- codeigniter4 shield
Classification
- Weakness
-
- CWE-352 Cross-Site Request Forgery
References
-
github.com
/codeigniter4/shield/commit/342a368536678621998c3c41d276480cd14ec6c6
web
-
github.com
/codeigniter4/shield/security/advisories/GHSA-5hm8-vh6r-2cjq
web, exploit, mitigation, third-party-advisory
-
codeigniter4.github.io
/userguide/libraries/security.htm
web, broken-link
-
developer.mozilla.org
/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
web, third-party-advisory
-
jub0bs.com
/posts/2021-01-29-great-samesite-confusion
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-35943
advisory
-
github.com
/codeigniter4/shield
package
Sources
- CVE List CVE-2022-35943
- GitHub Advisory GHSA-5hm8-vh6r-2cjq
- NVD CVE-2022-35943
- OSV BIT-codeigniter-2022-35943
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.