CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-63220

CVE-2026-63220: Trust of Untrusted Reverse Proxy Headers in CodeIgniter4

Alon Barad
Alon Barad
Software Engineer

Aug 8, 2026·7 min read·3 visits

Executive Summary (TL;DR)

Unauthenticated remote attackers can spoof HTTP forwarding headers to bypass HTTPS transport enforcement in CodeIgniter4 prior to version v4.7.4.

CodeIgniter4 versions prior to v4.7.4 contain a protocol-spoofing vulnerability due to improper verification of upstream reverse proxy forwarding headers. Remote, unauthenticated attackers can inject headers like X-Forwarded-Proto to deceive the framework into identifying an insecure HTTP request as a secure HTTPS connection.

Vulnerability Overview

CodeIgniter4 is a full-stack PHP framework used for developing web applications. To handle incoming network requests, CodeIgniter4 relies on the IncomingRequest class, which exposes the isSecure() method to determine if a connection is encrypted via HTTPS. This determination is a critical step for application security controls, such as enforcing SSL, setting secure cookies, and initiating forced secure redirects.

In versions prior to v4.7.4, the implementation of isSecure() evaluated client-supplied forwarding headers, such as X-Forwarded-Proto and Front-End-Https, without verifying the origin of the network request. In normal multi-tier infrastructures, reverse proxies terminate TLS and add these headers to downstream requests. However, when CodeIgniter4 accepts these headers blindly from any client, the boundary of trust is broken.

This flaw allows remote, unauthenticated attackers to manipulate the application's perceived network protocol. By appending specific HTTP headers to a plaintext request, an attacker can bypass secure transport validations and force the application to treat the connection as secure. This can lead to downstream exposure of sensitive session identifiers and configuration bypasses.

Root Cause Analysis

The root cause of CVE-2026-63220 resides in the logical sequence of the IncomingRequest::isSecure() helper method. The framework evaluates the presence of X-Forwarded-Proto and Front-End-Https headers immediately after checking standard local server environment variables. Because this evaluation is unconditional, the application assumes that any request carrying these headers was validated by an upstream proxy.

In a standard secure deployment, a reverse proxy sits between the public internet and the application server. The proxy is responsible for stripping incoming client-side forwarding headers and replacing them with verified values. However, if the application is directly exposed to the internet or the upstream proxy does not clean incoming headers, the application processes attacker-controlled headers as authentic.

This behavior matches the classification of CWE-348 (Use of Less Trusted Source). By prioritizing incoming header metadata over the physical and network origin of the request, CodeIgniter4 relies on unverified, less-trusted input for making critical security decisions. The framework lacks a validation layer to ensure the request peer address (REMOTE_ADDR) matches a predefined list of trusted proxies before interpreting forwarding headers.

Code Analysis

Reviewing the vulnerable code path in IncomingRequest.php shows how the application evaluated the headers unconditionally:

public function isSecure(): bool
{
    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') {
        return true;
    }
 
    if ($this->hasHeader('X-Forwarded-Proto') && $this->header('X-Forwarded-Proto')->getValue() === 'https') {
        return true;
    }
 
    if ($this->hasHeader('Front-End-Https') && $this->header('Front-End-Https')->getValue() === 'on') {
        return true;
    }
 
    return false;
}

The patched version introduces an immediate origin check via isFromTrustedProxy() before evaluating these headers. The updated isSecure() method in IncomingRequest.php is structured as follows:

public function isSecure(): bool
{
    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') {
        return true;
    }
 
    if (! $this->isFromTrustedProxy()) {
        return false;
    }
 
    if ($this->hasHeader('X-Forwarded-Proto') && $this->header('X-Forwarded-Proto')->getValue() === 'https') {
        return true;
    }
    // ...
}

The helper method isFromTrustedProxy() retrieves the registered proxy IP array from the application configuration. It then verifies the value of $_SERVER['REMOTE_ADDR'] against this whitelist. If the client IP address is not registered as a trusted proxy, the function returns false, preventing the application from interpreting any client-supplied protocol headers.

Furthermore, the patch implements a robust, binary-based IP comparison routine using inet_pton() inside checkIPAgainstProxy(). This update replaces the legacy, custom string-manipulation routine which was fragile and prone to parsing errors. The use of PHP's native network utilities ensures consistent validation across dual-stack IPv4 and IPv6 network environments.

Exploitation and Attack Methodology

An attacker can exploit this flaw by targeting web servers that are directly exposed to the internet or deployed behind misconfigured reverse proxies. The prerequisite is that the target server must accept HTTP traffic on port 80 and the application must use isSecure() or helper functions like force_https() to enforce security logic.

To simulate or verify the vulnerability, an attacker constructs an unencrypted HTTP request targeting a sensitive application endpoint. Using standard command-line tools, the attacker appends the X-Forwarded-Proto header with a value of https:

curl -H "X-Forwarded-Proto: https" http://example-target.com/login

Upon receiving this request, the vulnerable application server evaluates the isSecure() check. Because the header is present and equals https, the framework bypasses any forced redirect logic that would normally upgrade the client's connection to HTTPS. The login page loads over plain, unencrypted HTTP, allowing the user to transmit sensitive login credentials over a plaintext channel, exposing them to network-level sniffing attacks.

This flow chart illustrates how the vulnerability is exploited to bypass HTTPS redirection logic. The attacker maintains a plaintext connection while the application acts as if TLS is active.

Impact Assessment

The impact of CVE-2026-63220 is classified as Medium, with a CVSS v3.1 base score of 4.8. This rating reflects the dependency of the vulnerability on specific deployment patterns, such as direct exposure to the public internet or lack of proxy-side header sanitization. Although it does not directly enable remote code execution, it degrades transport layer protections and access controls.

A primary risk involves the exposure of sensitive session identifiers. Web browsers append the Secure attribute to session cookies to prevent them from being transmitted over unencrypted HTTP. However, if the application believes the connection is secure, it may output sensitive data or reflect active session state in a context where the transport layer is actually plaintext, leading to information disclosure.

Additionally, this issue can result in redirect loops or routing errors. If an upstream proxy actively enforces HTTPS redirects, but the backend is misconfigured or cannot properly validate the proxy, it may continuously issue redundant redirects or allow unauthenticated requests to bypass network boundary checks. This weakens defense-in-depth postures across the application infrastructure.

Remediation and Best Practices

The primary remediation for this vulnerability is to upgrade CodeIgniter4 to version v4.7.4 or later. This version enforces origin validation on all requests containing protocol forwarding headers, preventing clients from spoofing their protocol status directly to the application.

In addition to upgrading the framework, developers must properly configure the $proxyIPs setting in the app/Config/App.php configuration file. If the application runs behind a reverse proxy, load balancer, or CDN, all associated upstream IP addresses or subnets must be declared. If the application is directly exposed to the internet, this configuration must remain completely empty to disable header forwarding interpretation:

public array $proxyIPs = [
    '192.168.1.100' => 'X-Forwarded-For',
    '10.0.0.0/24'   => 'X-Forwarded-For'
];

For dual-stack network configurations, ensure that both IPv4 and their corresponding IPv6-mapped IPv4 addresses (such as ::ffff:192.168.1.100) are registered. If these are omitted, the strict address check will fail to identify the proxy, falling back to a secure-by-default posture that rejects the proxy forwarding headers.

At the infrastructure layer, reverse proxies and web application firewalls (WAFs) must be configured to sanitize incoming headers. Administrators must configure edge servers to strip or overwrite any client-supplied X-Forwarded-Proto, X-Forwarded-For, or Front-End-Https headers before forwarding the request to the backend. This prevents spoofed headers from reaching the application tier entirely.

Technical Appendix

CVSS Score
4.8/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
EPSS Probability
0.14%

Affected Systems

CodeIgniter4 Framework
AttributeDetail
CWE IDCWE-348
Attack VectorNetwork
CVSS SeverityMedium (4.8)
EPSS Score0.00135
ImpactProtocol Spoofing, Secure Transport Bypass
Exploit StatusProof-of-Concept
KEV StatusNot Listed
CWE-348
Use of Less Trusted Source

Vulnerability Timeline

Development of security patch and documentation updates
2026-05-22
Security fix merged into CodeIgniter4 codebase
2026-06-30
Official GitHub Security Advisory GHSA-7wmf-pw8j-mc78 published
2026-07-31
CVE-2026-63220 assigned and published on NVD
2026-07-31

More Reports

•about 1 hour ago•CVE-2026-66062
5.3

CVE-2026-66062: Regular Expression Denial of Service (ReDoS) in SvelteKit Content Negotiation

A Regular Expression Denial of Service (ReDoS) vulnerability exists in SvelteKit's content negotiation header parser prior to version 2.70.2. An unauthenticated remote attacker can exploit this vulnerability by sending a crafted Accept header with highly repetitive malformed values. This triggers catastrophic backtracking on the single-threaded Node.js/Bun event loop, leading to CPU exhaustion and full denial of service.

Alon Barad
Alon Barad
0 views•6 min read
•about 2 hours ago•CVE-2026-15895
8.4

CVE-2026-15895: OS Command Injection in AWS jsii-diff CLI

An OS command injection vulnerability exists in the npm package loading component of the jsii-diff CLI tool within the AWS jsii framework. Prior to version 1.131.0, when parsing package specifiers prefixed with `npm:`, the tool concatenated user-controlled inputs directly into a shell execution string via child_process.exec. This allows attackers to execute arbitrary shell commands under the context of the running Node.js process.

Amit Schendel
Amit Schendel
1 views•7 min read
•about 4 hours ago•CVE-2026-63221
9.4

CVE-2026-63221: SQL Injection in CodeIgniter4 Query Builder deleteBatch()

An SQL injection vulnerability exists in the Query Builder component of the CodeIgniter4 full-stack PHP framework. The vulnerability is located within the compilation logic of the batch delete operation, deleteBatch(). When an application chains where() conditions prior to calling deleteBatch(), the Query Builder fails to enforce or respect the escaping flags of the parameters bound to the WHERE clauses. Instead of passing these parameters through the database driver standard escaping logic, the compilation engine interpolates the raw, unescaped bound values directly into the compiled SQL string, allowing remote attackers to execute arbitrary SQL commands.

Amit Schendel
Amit Schendel
3 views•8 min read
•about 5 hours ago•CVE-2026-63222
7.5

CVE-2026-63222: Remote Code Execution via Path Traversal in CodeIgniter4 File Upload Handler

CVE-2026-63222 details a high-severity path traversal vulnerability in CodeIgniter4 versions prior to 4.7.4. The flaw lies within the `UploadedFile::move()` handler, which falls back to unsanitized, client-provided file names from the HTTP multipart request when a target name is not explicitly passed. An unauthenticated remote attacker can exploit this flaw to traverse arbitrary server directories, write malicious PHP payloads to the public-facing web root, and execute arbitrary code on the target system.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 6 hours ago•CVE-2026-63223
9.8

CVE-2026-63223: Unrestricted File Upload leading to Remote Code Execution in CodeIgniter4

A critical unrestricted file upload vulnerability (CWE-434) in CodeIgniter4 allows unauthenticated remote attackers to execute arbitrary code. By bypassing weak validation filters in the `is_image` and `mime_in` rules, an attacker can upload a malicious PHP payload disguised as a valid image file.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 7 hours ago•CVE-2026-67422
7.5

CVE-2026-67422: Regular Expression Denial of Service in pymdown-extensions

A high-severity Regular Expression Denial of Service (ReDoS) vulnerability in pymdown-extensions versions prior to 11.0.1 affects the Caret, Tilde, BetterEm, and MagicLink inline processors. When parsing user-supplied Markdown content containing malicious sequences of formatting delimiters, the regular expression engine is forced into catastrophic backtracking, resulting in CPU exhaustion and application denial of service.

Alon Barad
Alon Barad
3 views•5 min read