CVE-2022-37783: Craftcms/cms Craft CMS Discloses Password Hashes Vulnerability

HIGH
Advisory Identifier: GHSA-h972-v458-m892
CVSS 7.5
CWE-522 CWE-200
Published
Advisory Summary

CVE-2022-37783 is a HIGH (CVSS 7.5) craft cms discloses password hashes vulnerability (CWE-522: Insufficiently Protected Credentials) affecting Craftcms/cms libraries in the Packagist ecosystem. The issue involves craft cms discloses password hashes. Remediation is available by upgrading affected packages to version 3.7.33.

CVE-2022-37783 at a Glance

CVE Identifier CVE-2022-37783
GHSA Identifier GHSA-h972-v458-m892
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-522: Insufficiently Protected Credentials
Affected Product Craftcms/cms
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-2022-37783

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

craftcms/cms fixed: 3.7.33
Upgrade craftcms/cms to 3.7.33
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 craftcms/cms

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-37783, inspect your project dependencies for Craftcms/cms:

inspect dependencies for craftcms/cms

Analyze the terminal output to locate any version of Craftcms/cms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.7.33), 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 Craftcms/cms, 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

All Craft CMS versions between 3.0.0 and 3.7.32 disclose password hashes of users who authenticate using their E-Mail address or username in Anti-CSRF-Tokens. Craft CMS uses a cookie called CRAFT_CSRF_TOKEN and a HTML hidden field called CRAFT_CSRF_TOKEN to avoid Cross Site Request Forgery attacks. The CRAFT_CSRF_TOKEN cookie discloses the password hash in without encoding it whereas the corresponding HTML hidden field discloses the users' password hash in a masked manner, which can be decoded by using public functions of the YII framework.

CVE-2022-37783 Affected Craftcms/cms Versions

1 component(s)
Fixed Versions:
3.7.33
Product / Package Ecosystem Affected Versions Fixed Version
craftcms/cms
Packagist
≥ 3.0.0
< 3.7.33
3.7.33

References

Frequently Asked Questions

What is CVE-2022-37783?
CVE-2022-37783 is a security vulnerability in Craftcms/cms involving Craft CMS discloses password hashes under CWE-522: Insufficiently Protected Credentials.
Which Craftcms/cms versions are affected?
Affected versions include releases prior to 3.7.33 across affected packages: craftcms/cms.
What version fixes CVE-2022-37783?
Upgrading to 3.7.33 (or the latest patched release for your respective branch) resolves the vulnerability.
Is craftcms/cms affected?
Yes, craftcms/cms is affected in releases prior to 3.7.33. Upgrade your dependency to 3.7.33 or later.
What is the CVSS score of CVE-2022-37783?
CVE-2022-37783 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-2022-37783?
CVE-2022-37783 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-2022-37783?
Run the dependency tree command: 'inspect dependencies for craftcms/cms'. 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-h972-v458-m892",
  "modified" : "2024-06-10T19:11:21Z",
  "published" : "2022-12-05T21:30:41Z",
  "aliases" : [ "CVE-2022-37783" ],
  "summary" : "Craft CMS discloses password hashes",
  "details" : "All Craft CMS versions between 3.0.0 and 3.7.32 disclose password hashes of users who authenticate using their E-Mail address or username in Anti-CSRF-Tokens. Craft CMS uses a cookie called CRAFT_CSRF_TOKEN and a HTML hidden field called CRAFT_CSRF_TOKEN to avoid Cross Site Request Forgery attacks. The CRAFT_CSRF_TOKEN cookie discloses the password hash in without encoding it whereas the corresponding HTML hidden field discloses the users' password hash in a masked manner, which can be decoded by using public functions of the YII framework.",
  "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" : "craftcms/cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.7.33"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.7.32"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-37783"
  }, {
    "type" : "WEB",
    "url" : "https://at-trustit.tuv.at/tuev-trust-it-cves/cve-disclosure-of-password-hashes"
  }, {
    "type" : "WEB",
    "url" : "https://cves.at/posts/cve-2022-37783/writeup"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/craftcms/cms"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2024/06/06/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-522" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-12-07T14:56:02Z",
    "nvd_published_at" : "2022-12-05T21:15:00Z"
  }
}