MediumGHSA-7528-7jg5-6g62BIT-codeigniter-2022-21715CVE-2022-21715

Cross-site Scripting Vulnerability in CodeIgniter4

Published 27 Jan 2022 · Updated 16 Feb 2024

Affected package

Affected
<4.1.8
Fixed in
4.1.8
Update to the fixed version for your release line, for example:composer require codeigniter4/framework:^4.1.8

Details

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:

Is GHSA-7528-7jg5-6g62 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected codeigniter4/framework, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.