External risk intelligence

CodeIgniter4 SQL Injection via Named Bind Placeholders in Query Builder.

CVE advisorySeverity: CRITICAL (CVSS 9.2)

CVE-2026-142150

CodeIgniter4 is a PHP framework widely used to build web applications that are commonly deployed as public-facing websites and APIs. As the vulnerability exists within the database query processing layer, any web application utilizing this framework and exposing input fields to the internet is potentially reachable via this surface.

SQL Injection

Halo Surface Signal: 4 out of 5 — likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

A critical vulnerability has been identified in CodeIgniter4, a web application framework, that could allow attackers to execute arbitrary SQL commands. This issue arises from how named bind placeholders are handled in database queries, potentially allowing them to break out of intended string literals. The main concern is confirming relevance and exposure to understand the potential risk to our systems.

  • SQL injection flaw in database query handling.
  • Affects web applications built with the framework.
  • Assess relevance and potential exposure.

Attack Path

How an attacker could exploit the issue

Attackers can exploit this vulnerability by injecting specially crafted input into a web application built with CodeIgniter4. This malicious input can manipulate database queries, allowing the attacker to execute arbitrary SQL commands.

  • Unauthenticated remote access required.
  • Injecting named bind placeholders into query fragments.
  • Allows arbitrary SQL command execution.

Live Threat

Current exploitation, exposure, and threat context

When supported by the advisory, remote attackers could execute arbitrary SQL commands by manipulating named bind placeholders within database queries. This could allow unauthorized access to or modification of sensitive data, depending on the application's database schema and user permissions.

  • Database integrity and confidentiality
  • Injecting crafted SQL via placeholders
  • Unauthorized data access or modification

Operational Fix

Recommended remediation, mitigation, and detection steps

The SQL injection vulnerability in CodeIgniter4's Query::matchNamedBinds() function requires attackers to control both a named placeholder and its value within specific query contexts. This means application owners and platform teams are likely responsible for managing the CodeIgniter framework and its database interactions. The initial step is to identify all CodeIgniter applications, determine their exposure, and assess their criticality before planning remediation.

  • Application owners should own the remediation.
  • Verify if named binds are used in vulnerable contexts.
  • Plan updates during a scheduled maintenance window.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is CodeIgniter4 and what is it used for?

CodeIgniter4 is a lightweight PHP framework designed to help developers build dynamic web applications quickly. It provides a toolkit, including a database abstraction layer and query builder, to handle complex backend logic and database interactions. Because it is modular and efficient, many teams use it to power public-facing websites, internal tools, and APIs that interact with databases.

How does this CVE-2026-142150 SQL injection work?

This vulnerability is an SQL injection, classified as CWE-89. It occurs because the framework’s query processor incorrectly replaces named bind placeholders (e.g., :name:) within SQL strings. If a placeholder is placed inside a literal string, the software fails to treat it as data and instead interprets it as part of the command. This allows an attacker to break out of the intended query structure and append unauthorized, malicious SQL instructions.

What must an attacker do to trigger this vulnerability?

To trigger this, an attacker must have control over both the named bind placeholder injected into a database query fragment and the specific value assigned to that placeholder. This typically happens through application input fields. Importantly, static queries or those that do not utilize user-controlled named binds in specific functions like matchNamedBinds() are not affected by this particular flaw.

Is my application at risk if it uses CodeIgniter4?

Halo Surface Signal indicates that because CodeIgniter4 is frequently used for public-facing websites and APIs, any app exposing input fields to the internet is a potential target. Since this is an external-facing vulnerability, applications reachable from the internet are at higher risk. You should prioritize assessing any internet-connected system that processes user-supplied input through the framework’s query builder.

How should I respond to this CodeIgniter4 security issue?

Your first step is to create an inventory of all applications currently running CodeIgniter4 versions earlier than 4.7.6. Once identified, verify if those applications utilize named bind placeholders in database interactions. Coordinate with your application owners to plan an update to a patched version during your next maintenance window, as this update is necessary to secure the database query processing layer.

References