Insertion of Sensitive Information into Log File Affecting codeigniter4/shield package, versions <1.0.0-beta.8


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.13% (49th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Insertion of Sensitive Information into Log File vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-CODEIGNITER4SHIELD-6083349
  • published23 Nov 2023
  • disclosed23 Nov 2023
  • creditUnknown

Introduced: 23 Nov 2023

CVE-2023-48708  (opens in a new tab)
CWE-532  (opens in a new tab)

How to fix?

Upgrade codeigniter4/shield to version 1.0.0-beta.8 or higher.

Overview

codeigniter4/shield is an authentication and Authorization for CodeIgniter 4

Affected versions of this package are vulnerable to Insertion of Sensitive Information into Log File when successful login attempts are logged and one of tokens, jwt, or hmac authentication methods are in use. An attacker can obtain raw tokens and send requests with the user's authority by viewing the data in the log table.

Workaround

This vulnerability can be mitigated by disabling logging for successful login attempts in the configuration files.

  • For AccessTokens or HmacSha256, set Config\AuthToken::$recordLoginAttempt to Auth::RECORD_LOGIN_ATTEMPT_FAILURE or Auth::RECORD_LOGIN_ATTEMPT_NONE.

  • For JWT, set Config\AuthJWT::$recordLoginAttempt to Auth::RECORD_LOGIN_ATTEMPT_FAILURE or Auth::RECORD_LOGIN_ATTEMPT_NONE.

References

CVSS Scores

version 3.1