CVE-2022-35943

Public Exploit
SameSite may allow cross-site request forgery (CSRF) protection to be bypassed

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)

Category

5.9
CVSS
Severity: Medium
CVSS 3.1 •
EPSS 0.02%
Third-Party Advisory mozilla.org Third-Party Advisory github.com Third-Party Advisory jub0bs.com
Affected: codeigniter4 shield
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2022-35943?
CVE-2022-35943 has been scored as a medium severity vulnerability.
How to fix CVE-2022-35943?
To fix CVE-2022-35943, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2022-35943 being actively exploited in the wild?
It is possible that CVE-2022-35943 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2022-35943?
CVE-2022-35943 affects codeigniter4 shield.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.