{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-35943","id":"CVE-2022-35943","title":"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 o","descriptionLong":"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)","published":"2022-08-12T20:55:10.000Z","updated":"2026-10-28T02:31:06.866339782Z","reserved":"2022-07-15T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L","rating":"medium","source":"github.com"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L","rating":"medium","source":"OSV"},{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L","rating":"medium","source":"GitHub"}],"rating":"medium","products":["codeigniter4 shield"],"affectedProducts":[{"vendor":"codeigniter4","product":"shield","defaultStatus":null,"versions":[{"status":"affected","version":"> 4.3.2, > v1.0.0-beta.2"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"codeigniter4/shield","purl":"pkg:composer/codeigniter4/shield","ranges":[">=1.0.0-beta <1.0.0-beta.2"],"fixed":["1.0.0-beta.2"],"advisory":"GHSA-5hm8-vh6r-2cjq"}],"cwes":["CWE-352"],"aliases":["BIT-codeigniter-2022-35943","GHSA-5hm8-vh6r-2cjq"],"references":[{"url":"https://github.com/codeigniter4/shield/security/advisories/GHSA-5hm8-vh6r-2cjq","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Mitigation","Third Party Advisory","advisory","web"]},{"url":"https://codeigniter4.github.io/userguide/libraries/security.htm","tags":["x_refsource_MISC","x_transferred","Broken Link","web"]},{"url":"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"https://jub0bs.com/posts/2021-01-29-great-samesite-confusion","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35943.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-35943","tags":["advisory"]},{"url":"https://github.com/codeigniter4/shield/commit/342a368536678621998c3c41d276480cd14ec6c6","tags":["web"]},{"url":"https://github.com/codeigniter4/shield","tags":["package"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00611,"epssPercentile":0.50091,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-35943","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-35943","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-35943","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-5hm8-vh6r-2cjq","ok":true,"note":"GHSA-5hm8-vh6r-2cjq"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-35943","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}