Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2022-35943 — codeigniter

🟠 CVSS 8.0 — High ⚠️ Exploit Public CWE-352 NVD
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

CodeIgniter Shield Vulnerable to SameSite Attackers Bypassing the CSRF Protection

Impact

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/).

This vulnerability exists whether Config\Security::$csrfProtection is 'cookie' or 'session'.

It is also exploitable whether Config\Security::$regenerate is true or false.

Patches

Upgrade to CodeIgniter v4.2.3 or later and Shield v1.0.0-beta.2 or later.

Workarounds

Do all of the following:

  • set Config\Security::$csrfProtection to 'session'
  • remove old session data right after login (immediately after ID and password match)
  • regenerate CSRF token right after login (immediately after ID and password match)

References

  • [CodeIgniter4 CSRF Protection](https://codeigniter4.github.io/userguide/libraries/security.html)
  • [SameSite Attacks](https://canitakeyoursubdomain.name/)
  • [SameSite Cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite)
  • [The great SameSite confusion](https://jub0bs.com/posts/2021-01-29-great-samesite-confusion/)

For more information

If you have any questions or comments about this advisory:

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is high, an attacker needs no privileges on the target. A user must be tricked into taking some action. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity high, availability low.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: High — the attacker first has to win a race, learn a secret or otherwise prepare the target.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: Required — someone has to click, open or visit something.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: None.
  • Integrity impact: High — total loss, or loss the attacker controls.
  • Availability impact: Low — limited, and the attacker does not choose what is affected.

Weakness class

CVE-2022-35943 is classified as CWE-352: Cross-Site Request Forgery (CSRF). A state-changing request is accepted without proof it was intended, so another site can trigger it using the victim's session.

Affected software

CVE-2022-35943 is recorded against 3 packages.

  • codeigniter
  • codeigniter4/shield (from 1.0.0-beta up to 1.0.0-beta.2)
  • shield

Timeline and source

Published on 6 March 2024 and last revised on 17 June 2026. A public exploit is known to exist, which raises the urgency of patching considerably. Record sourced from NVD.

References

codeigniter4.github.io (Web)
developer.mozilla.org (Web)
github.com (Web)
jub0bs.com (Web)

Other advisories for this package

codeigniter has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-352: Cross-Site Request Forgery (CSRF)) in other software:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L
CWE CWE-352
Public Exploit ⚠️ Yes
Source NVD
Published 2024-03-06
Updated 2026-08-20
Modified 2026-06-17
Fix URL N/A

Affected Packages

Software From version Fixed in
codeigniter — —
codeigniter4/shield 1.0.0-beta 1.0.0-beta.2
shield — —

Similar Threats

Exploit Protection

Are you running codeigniter?

CVE-2022-35943 carries CVSS 8.0 High rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2022-35943 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2022
✓