{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-21715","id":"CVE-2022-21715","title":"Cross-site Scripting Vulnerability in CodeIgniter4","description":"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 ","descriptionLong":"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.","published":"2022-01-24T19:55:10.000Z","updated":"2026-10-28T02:31:07.239998241Z","reserved":"2021-11-16T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","rating":"medium","source":"GitHub"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","rating":"medium","source":"NVD"}],"rating":"medium","products":["CodeIgniter4"],"affectedProducts":[{"vendor":"codeigniter4","product":"CodeIgniter4","defaultStatus":null,"versions":[{"status":"affected","version":"< 4.1.8"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"codeigniter4/framework","purl":"pkg:composer/codeigniter4/framework","ranges":["<4.1.8"],"fixed":["4.1.8"],"advisory":"GHSA-7528-7jg5-6g62"}],"cwes":["CWE-79"],"aliases":["BIT-codeigniter-2022-21715","GHSA-7528-7jg5-6g62"],"references":[{"url":"https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-7528-7jg5-6g62","tags":["x_refsource_CONFIRM","x_transferred","Mitigation","Third Party Advisory","advisory","web"]},{"url":"https://github.com/codeigniter4/CodeIgniter4/commit/70d881cf5322b7c32e69516aebd2273ac6a1e8dd","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://codeigniter4.github.io/userguide/incoming/routing.html#use-defined-routes-only","tags":["x_refsource_MISC","x_transferred","Mitigation","Vendor Advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21715.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21715","tags":["advisory"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/codeigniter4/framework/CVE-2022-21715.yaml","tags":["web"]},{"url":"https://github.com/codeigniter4/framework","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.01035,"epssPercentile":0.6457,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-21715","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21715","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-21715","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-7528-7jg5-6g62","ok":true,"note":"GHSA-7528-7jg5-6g62"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-21715","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}