Cleartext Storage of Sensitive Information in HMAC SHA256 Authentication

Description

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
* Email us at [email protected]

Basic information

Type
reviewed
Severity
medium
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2023-11-23 00:28:14 UTC
Updated
2023-11-27 21:44:38 UTC
GitHub reviewed
2023-11-23 00:28:14 UTC
NVD published
2023-11-24

EPSS Score

Score Percentile
0.06% 18.54%

CVSS Scores

Base score Version Severity Vector
5.0 3.1
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:H)
They need powerful rights—admin, root, or similar—before this pays off.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.

Identifiers

CWEs

CWE id Name
CWE-312 Cleartext Storage of Sensitive Information

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
composer codeigniter4/shield < 1.0.0-beta.8 1.0.0-beta.8

References

cvelogic Threat Intelligence