Inadequate XSS Prevention in CodeIgniter/Framework Security Library

codeigniter/framework Updated 02 Oct 2025

Summary

15/05/2024
MODERATE
Yes i
Moderate
4.7

GHSA-q9j3-4ghj-6h57: Inadequate XSS Prevention in CodeIgniter/Framework Security Library. Affects codeigniter/framework versions < 3.0.3. Fixed in 3.0.3. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

CodeIgniter/Framework is a popular PHP framework used for developing web applications. It provides a set of libraries and tools to simplify the development process. The Security Library in CodeIgniter/Framework includes the xss_clean() method, which is designed to sanitize input data and prevent Cross-Site Scripting (XSS) attacks. However, versions prior to 3.0.3 have a vulnerability that allows certain XSS vectors to bypass the intended protection mechanisms.

Vulnerability Detail

The xss_clean() method in the Security Library of CodeIgniter/Framework, specifically in versions before 3.0.3, is susceptible to a Cross-Site Scripting (XSS) vulnerability. This vulnerability occurs because the method does not adequately mitigate specific XSS vectors, leaving a potential security gap. An attacker can exploit this vulnerability by injecting malicious scripts or code into user input fields, which can then be executed by unsuspecting users. This can lead to various consequences, including unauthorized access, data theft, and the potential for further exploitation of the affected application.

How To Fix

Minimum fixed version

3.0.3

This is the first release that contains the fix.

composer require codeigniter/framework:3.0.3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating to the latest version is not immediately feasible, a temporary workaround can be implemented by manually sanitizing user input using additional security measures. This can include input validation, output encoding, and strict input filtering. However, it is important to note that these workarounds may not provide the same level of protection as the updated version of CodeIgniter/Framework.

Conclusion

Inadequate XSS prevention in the CodeIgniter/Framework Security Library can leave web applications vulnerable to Cross-Site Scripting attacks. It is crucial to update to version 3.0.3 or later to fix this vulnerability. In the meantime, implementing additional security measures can provide temporary protection. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for codeigniter/framework →

Share this vulnerability

FAQ

CodeIgniter/Framework is a PHP framework used for developing web applications. It provides a set of libraries and tools to simplify the development process.

Cross-Site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts or code into web pages viewed by other users. This can lead to unauthorized access, data theft, and other malicious activities.

The xss_clean() method in the Security Library of CodeIgniter/Framework is designed to sanitize input data by removing potentially malicious content. It helps prevent XSS attacks by filtering and encoding user input.

This vulnerability can lead to unauthorized access, data theft, and the potential for further exploitation of the affected application. Attackers can inject malicious scripts or code into user input fields, which can then be executed by unsuspecting users.

To protect your application, it is recommended to update CodeIgniter/Framework to version 3.0.3 or later. Additionally, implementing proper input validation, output encoding, and strict input filtering can help mitigate the risk of XSS attacks.

Related vulnerabilities

Recent vulnerabilities recorded for codeigniter/framework.

How To Fix

Minimum fixed version

3.0.3

This is the first release that contains the fix.

composer require codeigniter/framework:3.0.3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback