Vulnerabilities · 2022 · Codeigniter
CVE-2022-21715
Codeigniter vulnerability
CodeIgniter4 is the 4.x branch of CodeIgniter, a PHP full-stack web framework. A cross-site scripting (XSS) vulnerability was found in `API\ResponseTrait` in Codeigniter4 prior to version 4.1.8. Attackers can do XSS attacks if a potential victim is using `API\ResponseTrait`. Version 4.1.8 contains a patch for this vulnerability. There are two potential workarounds available. Users may avoid using `API\ResponseTrait` or `ResourceController` Users may also disable Auto Route and use defined routes only.
Affected products
Codeigniter. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Codeigniter runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- codeigniter4.github.io/userguide/incoming/routing.html#use-defined-routes-only · Mitigation
- github.com/codeigniter4/CodeIgniter4/commit/70d881cf5322b7c32e69516aebd2273ac6a1e8dd · Patch
- github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-7528-7jg5-6g62 · Mitigation
- nvd.nist.gov/vuln/detail/CVE-2022-21715
- cve.org/CVERecord?id=CVE-2022-21715
More vulnerabilities in Codeigniter products
CVE-2025-54418CVE-2025-24013CVE-2024-41344CVE-2024-29904CVE-2023-48708CVE-2023-48707CVE-2023-46240CVE-2023-32692All 43
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.