CVE-2022-21715
mediumpriority · track · 24EPSS 0.010 · 63 %ileEUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (4)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- GHSA-7528-7jg5-6g62Cross-site Scripting Vulnerability in CodeIgniter42022-01-27ghsa · osvUS
### Impact Cross-Site Scripting (XSS) vulnerability was found in `API\ResponseTrait` in Codeigniter4. Attackers can do XSS attacks if you are using `API\ResponseTrait`. ### Patches Upgrade to v4.1.8 or later. ### Workarounds Do one of the following: 1. Do not use `API\ResponseTrait` nor `ResourceController` 2. Disable Auto Route and [Use Defined Routes Only](https://codeigniter4.github.io/userguide/incoming/routing.html#use-defined-routes-only) ### References - [Cross Site Scripting (XSS) Software Attack | OWASP Foundation](https://owasp.org/www-community/attacks/xss/) ### For more information If you have any questions or comments about this advisory: * Open an issue in [codeigniter4/CodeIgniter4](https://github.com/codeigniter4/CodeIgniter4/issues) * Email us at [SECURITY.md](https://github.com/codeigniter4/CodeIgniter4/blob/develop/SECURITY.md)
- BIT-codeigniter-2022-217152024-03-06vendor · osvUS
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.
also known as (5)
Other names and identifiers for this entity.
- CNNVD-202201-2270cnnvd
- EUVD-2022-0495enisa_euvd
- GHSA-7528-7jg5-6g62enisa_euvd
- BIT-codeigniter-2022-21715osv
- GHSA-7528-7jg5-6g62osv
sources
Which sources assert this record, and when.
references (11)
External citations — patches, advisories, analysis.
- https://codeigniter4.github.io/userguide/incoming/routing.html#use-defined-routes-onlycnnvd
- https://github.com/codeigniter4/CodeIgniter4/commit/70d881cf5322b7c32e69516aebd2273ac6a1e8ddcnnvd
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-7528-7jg5-6g62cnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2022-21715cnnvd
- https://www.cybersecurity-help.cz/vdb/SB2022012626cnnvd
- https://codeigniter4.github.io/userguide/incoming/routing.html#use-defined-routes-onlyenisa_euvd
- https://github.com/codeigniter4/CodeIgniter4/commit/70d881cf5322b7c32e69516aebd2273ac6a1e8ddenisa_euvd
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-7528-7jg5-6g62enisa_euvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan