CVE-2023-46240: Codeigniter4/framework CodeIgniter4 Vulnerable To Information Disclosure Vulnerability

HIGH
Advisory Identifier: GHSA-hwxf-qxj7-7rfj
CVSS 7.5
CWE-209
Published
Advisory Summary

CVE-2023-46240 is a HIGH (CVSS 7.5) codeigniter4 vulnerable to information disclosure vulnerability (CWE-209: Generation of Error Message Containing Sensitive Information) affecting Codeigniter4/framework libraries in the Packagist ecosystem. The issue involves codeigniter4 vulnerable to information disclosure when detailed error report is displayed in production environment. Remediation is available by upgrading affected packages to version 4.4.3.

CVE-2023-46240 at a Glance

CVE Identifier CVE-2023-46240
GHSA Identifier GHSA-hwxf-qxj7-7rfj
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-209: Generation of Error Message Containing Sensitive Information
Affected Product Codeigniter4/framework
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2023-46240

To remediate this vulnerability, upgrade all affected Codeigniter4/framework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

codeigniter4/framework fixed: 4.4.3
Upgrade codeigniter4/framework to 4.4.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for codeigniter4/framework

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-46240, inspect your project dependencies for Codeigniter4/framework:

inspect dependencies for codeigniter4/framework

Analyze the terminal output to locate any version of Codeigniter4/framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.4.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-209: Generation of Error Message Containing Sensitive Information, where the product generates an error message that includes sensitive information about its environment, users, or associated data. In Codeigniter4/framework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact If an error or exception occurs in CodeIgniter4 v4.4.2 and earlier, a detailed error report is displayed even if in the production environment. As a result, confidential information may be leaked. ### Patches Upgrade to v4.4.3 or later. See [upgrading guide](https://codeigniter4.github.io/userguide/installation/upgrade_443.html). ### Workarounds Replace `ini_set('display_errors', '0')` with `ini_set('display_errors', 'Off')` in `app/Config/Boot/production.php`. ### For more information If you have any questions or comments about this advisory: * Open an issue in [codeigniter4/CodeIgniter4](https://github.com/codeigniter4/CodeIgniter4/issues) * Email us at [SECURITY.md](https://github.com/codeigniter4/CodeIgniter4/blob/develop/SECURITY.md)

CVE-2023-46240 Affected Codeigniter4/framework Versions

1 component(s)
Fixed Versions:
4.4.3
Product / Package Ecosystem Affected Versions Fixed Version
codeigniter4/framework
Packagist
< 4.4.3
4.4.3

References

Frequently Asked Questions

What is CVE-2023-46240?
CVE-2023-46240 is a security vulnerability in Codeigniter4/framework involving CodeIgniter4 vulnerable to information disclosure when detailed error report is displayed in production environment under CWE-209: Generation of Error Message Containing Sensitive Information.
Which Codeigniter4/framework versions are affected?
Affected versions include releases prior to 4.4.3 across affected packages: codeigniter4/framework.
What version fixes CVE-2023-46240?
Upgrading to 4.4.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is codeigniter4/framework affected?
Yes, codeigniter4/framework is affected in releases prior to 4.4.3. Upgrade your dependency to 4.4.3 or later.
What is the CVSS score of CVE-2023-46240?
CVE-2023-46240 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2023-46240?
CVE-2023-46240 is classified under CWE-209: Generation of Error Message Containing Sensitive Information (The product generates an error message that includes sensitive information about its environment, users, or associated data.).
How can I check Packagist dependencies for CVE-2023-46240?
Run the dependency tree command: 'inspect dependencies for codeigniter4/framework'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hwxf-qxj7-7rfj",
  "modified" : "2023-10-30T15:21:32Z",
  "published" : "2023-10-30T15:18:56Z",
  "aliases" : [ "CVE-2023-46240" ],
  "summary" : "CodeIgniter4 vulnerable to information disclosure when detailed error report is displayed in production environment ",
  "details" : "### Impact\nIf an error or exception occurs in CodeIgniter4 v4.4.2 and earlier, a detailed error report is displayed even if in the production environment. As a result, confidential information may be leaked.\n\n### Patches\nUpgrade to v4.4.3 or later. See [upgrading guide](https://codeigniter4.github.io/userguide/installation/upgrade_443.html).\n\n### Workarounds\nReplace `ini_set('display_errors', '0')` with `ini_set('display_errors', 'Off')` in `app/Config/Boot/production.php`.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [codeigniter4/CodeIgniter4](https://github.com/codeigniter4/CodeIgniter4/issues)\n* Email us at [SECURITY.md](https://github.com/codeigniter4/CodeIgniter4/blob/develop/SECURITY.md)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "codeigniter4/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.4.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.4.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-hwxf-qxj7-7rfj"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-46240"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/codeigniter4/CodeIgniter4/commit/423569fc31e29f51635a2e59c89770333f0e7563"
  }, {
    "type" : "WEB",
    "url" : "https://codeigniter4.github.io/userguide/general/errors.html#error-reporting"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/codeigniter4/CodeIgniter4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-209" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-10-30T15:18:56Z",
    "nvd_published_at" : "2023-10-31T16:15:09Z"
  }
}