CVE-2020-5229: Password Hashing Do Not Use MD5 Vulnerability

LOW
Advisory Identifier: GHSA-h362-m8f2-5x7c
CVSS 7.7
CWE-327
Published
Advisory Summary

CVE-2020-5229 is a LOW (CVSS 7.7) do not use md5 vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Password Hashing libraries in the Maven ecosystem. The issue involves do not use md5. Remediation is available by upgrading affected packages to version 7.6, 8.1.

CVE-2020-5229 at a Glance

CVE Identifier CVE-2020-5229
GHSA Identifier GHSA-h362-m8f2-5x7c
Severity LOW
CVSS v3.1 Base Score 7.7
CWE Classification CWE-327: Use of a Broken or Risky Cryptographic Algorithm
Affected Product Password Hashing
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.7

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

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

How to Fix CVE-2020-5229

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

org.opencastproject:opencast-common-jpa-impl fixed: 7.6
<dependency>
    <groupId>org.opencastproject</groupId>
    <artifactId>opencast-common-jpa-impl</artifactId>
    <version>7.6</version>
</dependency>
org.opencastproject:opencast-common-jpa-impl fixed: 8.1
<dependency>
    <groupId>org.opencastproject</groupId>
    <artifactId>opencast-common-jpa-impl</artifactId>
    <version>8.1</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.opencastproject

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2020-5229, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.opencastproject

Analyze the terminal output to locate any version of Password Hashing in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.6), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.opencastproject command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. In Password Hashing, 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 User passwords are stored in the database using the rather outdated and cryptographically insecure MD5 hash algorithm. Furthermore, the hashes are salted using the username instead of a random salt, causing hashes for users with the same username and password to collide which is problematic especially for popular users like the default `admin` user. This essentially means that for an attacker, it might be feasible to reconstruct a user's password given access to these hashes. Note that attackers needing access to the hashes means that they must gain access to the database in which these are stored first to be able to start cracking the passwords. ### Patches The problem is addressed in Opencast 8.1 which now uses the modern and much stronger bcrypt password hashing algorithm for storing passwords. Note, that old hashes remain MD5 until the password is updated. For a list of users whose password hashes are stored using MD5, take a look at the `/user-utils/users/md5.json` REST endpoint. ### Workarounds There is no workaround. ### References - [MD5 (Wikipedia)](https://en.wikipedia.org/wiki/MD5) - [bcrypt (Wikipedia)](https://en.wikipedia.org/wiki/Bcrypt) - [How weak is MD5 as a password hashing function?](https://security.stackexchange.com/q/52461) ### For more information If you have any questions or comments about this advisory: - Open an issue in [opencast/opencast](https://github.com/opencast/opencast/issues) - For security-relevant information, email us at security@opencast.org

CVE-2020-5229 Affected Password Hashing Versions

2 component(s)
Fixed Versions:
7.68.1
Product / Package Ecosystem Affected Versions Fixed Version
org.opencastproject:opencast-common-jpa-impl
Maven
< 7.6
7.6
org.opencastproject:opencast-common-jpa-impl
Maven
≥ 8.0
< 8.1
8.1

References

Frequently Asked Questions

What is CVE-2020-5229?
CVE-2020-5229 is a security vulnerability in Password Hashing involving Do not use MD5 under CWE-327: Use of a Broken or Risky Cryptographic Algorithm.
Which Password Hashing versions are affected?
Affected versions include releases prior to 7.6, 8.1 across affected packages: org.opencastproject:opencast-common-jpa-impl.
What version fixes CVE-2020-5229?
Upgrading to 7.6, 8.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is opencast-common-jpa-impl affected?
Yes, org.opencastproject:opencast-common-jpa-impl is affected in releases prior to 7.6, 8.1. Upgrade your dependency to 7.6, 8.1 or later.
What is the CVSS score of CVE-2020-5229?
CVE-2020-5229 has a CVSS v3.1 base score of 7.7 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2020-5229?
CVE-2020-5229 is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm (The product uses a broken or risky cryptographic algorithm or protocol.).
How can I check Maven dependencies for CVE-2020-5229?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.opencastproject'. 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-h362-m8f2-5x7c",
  "modified" : "2021-01-08T20:31:50Z",
  "published" : "2020-01-30T21:21:58Z",
  "aliases" : [ "CVE-2020-5229" ],
  "summary" : "Password Hashing: Do not use MD5",
  "details" : "### Impact\n\nUser passwords are stored in the database using the rather outdated and cryptographically insecure MD5 hash algorithm. Furthermore, the hashes are salted using the username instead of a random salt, causing hashes for users with the same username and password to collide which is problematic especially for popular users like the default `admin` user.\n\nThis essentially means that for an attacker, it might be feasible to reconstruct a user's password given access to these hashes.\n\nNote that attackers needing access to the hashes means that they must gain access to the database in which these are stored first to be able to start cracking the passwords.\n\n\n### Patches\n\nThe problem is addressed in Opencast 8.1 which now uses the modern and much stronger bcrypt password hashing algorithm for storing passwords. Note, that old hashes remain MD5 until the password is updated.\n\nFor a list of users whose password hashes are stored using MD5, take a look at the `/user-utils/users/md5.json` REST endpoint.\n\n\n### Workarounds\n\nThere is no workaround.\n\n### References\n\n- [MD5 (Wikipedia)](https://en.wikipedia.org/wiki/MD5)\n- [bcrypt (Wikipedia)](https://en.wikipedia.org/wiki/Bcrypt)\n- [How weak is MD5 as a password hashing function?](https://security.stackexchange.com/q/52461)\n\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n- Open an issue in [opencast/opencast](https://github.com/opencast/opencast/issues)\n- For security-relevant information, email us at security@opencast.org",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.opencastproject:opencast-common-jpa-impl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "7.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.opencastproject:opencast-common-jpa-impl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0"
      }, {
        "fixed" : "8.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/opencast/opencast/security/advisories/GHSA-h362-m8f2-5x7c"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-5229"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opencast/opencast/commit/32bfbe5f78e214e2d589f92050228b91d704758e"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-327" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-01-30T19:59:06Z",
    "nvd_published_at" : null
  }
}