CVE-2023-48707: Codeigniter4/shield Cleartext Storage Of Sensitive Information Vulnerability

MODERATE
Advisory Identifier: GHSA-v427-c49j-8w6x
CVSS 5.0
CWE-312
Published
Advisory Summary

CVE-2023-48707 is a MODERATE (CVSS 5.0) cleartext storage of sensitive information vulnerability (CWE-312: Cleartext Storage of Sensitive Information) affecting Codeigniter4/shield libraries in the Packagist ecosystem. The issue involves cleartext storage of sensitive information in hmac sha256 authentication. Remediation is available by upgrading affected packages to version 1.0.0-beta.8.

CVE-2023-48707 at a Glance

CVE Identifier CVE-2023-48707
GHSA Identifier GHSA-v427-c49j-8w6x
Severity MODERATE
CVSS v3.1 Base Score 5.0
CWE Classification CWE-312: Cleartext Storage of Sensitive Information
Affected Product Codeigniter4/shield
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 5.0

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

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

How to Fix CVE-2023-48707

To remediate this vulnerability, upgrade all affected Codeigniter4/shield 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/shield fixed: 1.0.0-beta.8
Upgrade codeigniter4/shield to 1.0.0-beta.8
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/shield

How to Check if You Are Affected

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

inspect dependencies for codeigniter4/shield

Analyze the terminal output to locate any version of Codeigniter4/shield in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0-beta.8), 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-312: Cleartext Storage of Sensitive Information, where the product stores sensitive information in cleartext within a resource that might be accessible to another control sphere. In Codeigniter4/shield, 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 **secretKey**, an important key for HMAC SHA256 authentication, was stored in the database in raw form. If a malicious person somehow had access to the data in the database, they could use the key and secretKey for HMAC SHA256 authentication to send requests impersonating that person. ### Patches Upgrade to Shield v1.0.0-beta.8 or later. After upgrading, all existing secret keys must be encrypted. See https://github.com/codeigniter4/shield/blob/develop/UPGRADING.md for details. ### Workarounds None. ### References - https://codeigniter4.github.io/shield/references/authentication/hmac/ ### For more information If you have any questions or comments about this advisory: * Open an issue or discussion in [codeigniter4/shield](https://github.com/codeigniter4/shield) * Email us at [security@codeigniter.com](mailto:security@codeigniter.com)

CVE-2023-48707 Affected Codeigniter4/shield Versions

1 component(s)
Fixed Versions:
1.0.0-beta.8
Product / Package Ecosystem Affected Versions Fixed Version
codeigniter4/shield
Packagist
< 1.0.0-beta.8
1.0.0-beta.8

References

Frequently Asked Questions

What is CVE-2023-48707?
CVE-2023-48707 is a security vulnerability in Codeigniter4/shield involving Cleartext Storage of Sensitive Information in HMAC SHA256 Authentication under CWE-312: Cleartext Storage of Sensitive Information.
Which Codeigniter4/shield versions are affected?
Affected versions include releases prior to 1.0.0-beta.8 across affected packages: codeigniter4/shield.
What version fixes CVE-2023-48707?
Upgrading to 1.0.0-beta.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is codeigniter4/shield affected?
Yes, codeigniter4/shield is affected in releases prior to 1.0.0-beta.8. Upgrade your dependency to 1.0.0-beta.8 or later.
What is the CVSS score of CVE-2023-48707?
CVE-2023-48707 has a CVSS v3.1 base score of 5.0 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:L/A:N.
What CWE is associated with CVE-2023-48707?
CVE-2023-48707 is classified under CWE-312: Cleartext Storage of Sensitive Information (The product stores sensitive information in cleartext within a resource that might be accessible to another control sphere.).
How can I check Packagist dependencies for CVE-2023-48707?
Run the dependency tree command: 'inspect dependencies for codeigniter4/shield'. 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-v427-c49j-8w6x",
  "modified" : "2023-11-27T21:44:37Z",
  "published" : "2023-11-23T00:28:14Z",
  "aliases" : [ "CVE-2023-48707" ],
  "summary" : "Cleartext Storage of Sensitive Information in HMAC SHA256 Authentication",
  "details" : "### Impact\n**secretKey**, an important key for HMAC SHA256 authentication, was stored in the database in raw form.\n\nIf a malicious person somehow had access to the data in the database, they could use the key and secretKey for HMAC SHA256 authentication to send requests impersonating that person.\n\n### Patches\nUpgrade to Shield v1.0.0-beta.8 or later.\n\nAfter upgrading, all existing secret keys must be encrypted.\nSee https://github.com/codeigniter4/shield/blob/develop/UPGRADING.md for details.\n\n### Workarounds\nNone.\n\n### References\n- https://codeigniter4.github.io/shield/references/authentication/hmac/\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue or discussion in [codeigniter4/shield](https://github.com/codeigniter4/shield)\n* Email us at [security@codeigniter.com](mailto:security@codeigniter.com)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "codeigniter4/shield"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.0-beta.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/codeigniter4/shield/security/advisories/GHSA-v427-c49j-8w6x"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-48707"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/codeigniter4/shield/commit/f77c6ae20275ac1245330a2b9a523bf7e6f6202f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/codeigniter4/shield"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-312" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-11-23T00:28:14Z",
    "nvd_published_at" : "2023-11-24T18:15:07Z"
  }
}