{"id":"CVE-2022-21715","summary":"Cross-site Scripting Vulnerability in CodeIgniter4","details":"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.","aliases":["BIT-codeigniter-2022-21715","GHSA-7528-7jg5-6g62"],"modified":"2026-04-02T07:46:22.487746Z","published":"2022-01-24T19:55:10Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21715.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-79"]},"references":[{"type":"WEB","url":"https://codeigniter4.github.io/userguide/incoming/routing.html#use-defined-routes-only"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21715.json"},{"type":"ADVISORY","url":"https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-7528-7jg5-6g62"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21715"},{"type":"FIX","url":"https://github.com/codeigniter4/CodeIgniter4/commit/70d881cf5322b7c32e69516aebd2273ac6a1e8dd"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/codeigniter4/codeigniter4","events":[{"introduced":"47dbb16bb5e5784f45bf09a7380016f2d36f7c39"},{"fixed":"70d881cf5322b7c32e69516aebd2273ac6a1e8dd"}]}],"versions":["4.0.0","4.0.2","v4.0.1","v4.0.3","v4.0.4","v4.0.5","v4.1.0","v4.1.1","v4.1.2","v4.1.3","v4.1.4","v4.1.5","v4.1.6","v4.1.7"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-21715.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"}]}