CVE-2022-46170 CodeIgniter is vulnerable to improper authentication via Session Handlers

High 8.6 Published Updated

Attackers can bypass authentication and access admin pages by reusing user session cookies when multiple session cookies and specific session handlers are configured.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-46170?

CVE-2022-46170 is a high-severity authentication bypass vulnerability in CodeIgniter4, published on 22 Dec 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

CodeIgniter is a PHP full-stack web framework. When an application uses (1) multiple session cookies (e.g., one for user pages and one for admin pages) and (2) a session handler is set to `DatabaseHandler`, `MemcachedHandler`, or `RedisHandler`, then if an attacker gets one session cookie (e.g., one for user pages), they may be able to access pages that require another session cookie (e.g., for admin pages). This issue has been patched, please upgrade to version 4.2.11 or later. As a workaround, use only one session cookie.

Weakness: CWE-287

Which versions are affected by CVE-2022-46170?

3 open source packages ship an affected version, including codeigniter4/framework and codeigniter. It affects 1 product.

PackageAffectedFixed in
codeigniter4/framework PackagistAll versions4.2.11
codeigniter4/framework PackagistAll versions4.2.11
codeigniter BitnamiFrom 4.0.04.2.11

Products include Codeigniter Codeigniter.

How do I fix CVE-2022-46170?

Upgrade codeigniter4/framework to 4.2.11 or later.

Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.

Is CVE-2022-46170 being exploited?

There is no known exploitation of CVE-2022-46170 in the wild and no public exploit code.

Sources

Also known as BIT-codeigniter-2022-46170, GHSA-6cq5-8cj7-g558.

Is CVE-2022-46170 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free