All reports
Medium

Cross-site Scripting Vulnerability in CodeIgniter4

Affected versions

Affected versions
< 4.1.8
Fixed version
4.1.8

Exploitation

CVE-2022-21715

Probability of exploitation in the next 30 days: 1.04%

FIRST EPSS · 2026-11-21

Description

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

References
For more information

If you have any questions or comments about this advisory:

Links

Credits

  • kenjis