CVE-2024-5657: Born05/craft twofactorauthentication Password Hash Exposed Vulnerability

LOW
Advisory Identifier: GHSA-3p4x-grpm-xw58
CVSS 3.7
CWE-522 CWE-200
Published
Advisory Summary

CVE-2024-5657 is a LOW (CVSS 3.7) password hash exposed vulnerability (CWE-522: Insufficiently Protected Credentials) affecting Born05/craft twofactorauthentication libraries in the Packagist ecosystem. The issue involves password hash exposed in craftcms two factor authentication plugin. Remediation is available by upgrading affected packages to version 3.3.4.

CVE-2024-5657 at a Glance

CVE Identifier CVE-2024-5657
GHSA Identifier GHSA-3p4x-grpm-xw58
Severity LOW
CVSS v3.1 Base Score 3.7
CWE Classification CWE-522: Insufficiently Protected Credentials
Affected Product Born05/craft twofactorauthentication
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 3.7

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

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

How to Fix CVE-2024-5657

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

born05/craft-twofactorauthentication fixed: 3.3.4
Upgrade born05/craft-twofactorauthentication to 3.3.4
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 born05/craft-twofactorauthentication

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-5657, inspect your project dependencies for Born05/craft twofactorauthentication:

inspect dependencies for born05/craft-twofactorauthentication

Analyze the terminal output to locate any version of Born05/craft twofactorauthentication in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.3.4), 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-522: Insufficiently Protected Credentials, where the product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval. In Born05/craft twofactorauthentication, 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

The CraftCMS plugin Two-Factor Authentication in versions 3.3.1, 3.3.2 and 3.3.3 discloses the password hash of the currently authenticated user after submitting a valid TOTP.

CVE-2024-5657 Affected Born05/craft twofactorauthentication Versions

1 component(s)
Fixed Versions:
3.3.4
Product / Package Ecosystem Affected Versions Fixed Version
born05/craft-twofactorauthentication
Packagist
≥ 3.3.1
< 3.3.4
3.3.4

References

Frequently Asked Questions

What is CVE-2024-5657?
CVE-2024-5657 is a security vulnerability in Born05/craft twofactorauthentication involving Password hash exposed in CraftCMS two factor authentication plugin under CWE-522: Insufficiently Protected Credentials.
Which Born05/craft twofactorauthentication versions are affected?
Affected versions include releases prior to 3.3.4 across affected packages: born05/craft-twofactorauthentication.
What version fixes CVE-2024-5657?
Upgrading to 3.3.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is born05/craft-twofactorauthentication affected?
Yes, born05/craft-twofactorauthentication is affected in releases prior to 3.3.4. Upgrade your dependency to 3.3.4 or later.
What is the CVSS score of CVE-2024-5657?
CVE-2024-5657 has a CVSS v3.1 base score of 3.7 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2024-5657?
CVE-2024-5657 is classified under CWE-522: Insufficiently Protected Credentials (The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.).
How can I check Packagist dependencies for CVE-2024-5657?
Run the dependency tree command: 'inspect dependencies for born05/craft-twofactorauthentication'. 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-3p4x-grpm-xw58",
  "modified" : "2024-06-10T20:22:12Z",
  "published" : "2024-06-06T12:30:36Z",
  "aliases" : [ "CVE-2024-5657" ],
  "summary" : "Password hash exposed in CraftCMS two factor authentication plugin",
  "details" : "The CraftCMS plugin Two-Factor Authentication in versions 3.3.1, 3.3.2 and 3.3.3 discloses the password hash of the currently authenticated user after submitting a valid TOTP.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "born05/craft-twofactorauthentication"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.3.1"
      }, {
        "fixed" : "3.3.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-5657"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/born05/craft-twofactorauthentication/commit/eb93bcb73037171dae8ca5cfa4c20e7e5748b73a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/born05/craft-twofactorauthentication"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/born05/craft-twofactorauthentication/releases/tag/3.3.4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sbaresearch/advisories/tree/public/2024/SBA-ADV-20240202-01_CraftCMS_Plugin_Two-Factor_Authentication_Password_Hash_Disclosure"
  }, {
    "type" : "WEB",
    "url" : "https://plugins.craftcms.com/two-factor-authentication?craft4"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2024/06/06/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-522" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-06-06T19:13:50Z",
    "nvd_published_at" : "2024-06-06T11:15:49Z"
  }
}