CVE-2020-5222: Opencast kernel Hard-Coded Key Used For Remember-me Vulnerability
MODERATECVE-2020-5222 is a MODERATE (CVSS 6.8) hard-coded key used for remember-me vulnerability (CWE-798: Use of Hard-coded Credentials) affecting Opencast kernel libraries in the Maven ecosystem. The issue involves hard-coded key used for remember-me token in opencast. Remediation is available by upgrading affected packages to version 7.6, 8.1.
CVE-2020-5222 at a Glance
Security Impact
CVSS: 6.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N).
How to Fix CVE-2020-5222
To remediate this vulnerability, upgrade all affected Opencast kernel dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.opencastproject</groupId>
<artifactId>opencast-kernel</artifactId>
<version>7.6</version>
</dependency>
<dependency>
<groupId>org.opencastproject</groupId>
<artifactId>opencast-kernel</artifactId>
<version>8.1</version>
</dependency>
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-5222, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.opencastproject
Analyze the terminal output to locate any version of Opencast kernel 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-798: Use of Hard-coded Credentials, where the product contains hard-coded credentials, such as a password or cryptographic key. In Opencast kernel, 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
CVE-2020-5222 Affected Opencast kernel Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.opencastproject:opencast-kernel
|
Maven |
< 7.6
|
7.6
|
|
org.opencastproject:opencast-kernel
|
Maven |
≥ 8.0
< 8.1
|
8.1
|
References
Frequently Asked Questions
What is CVE-2020-5222?
Which Opencast kernel versions are affected?
What version fixes CVE-2020-5222?
Is opencast-kernel affected?
What is the CVSS score of CVE-2020-5222?
What CWE is associated with CVE-2020-5222?
How can I check Maven dependencies for CVE-2020-5222?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mh8g-hprg-8363",
"modified" : "2021-10-20T18:03:56Z",
"published" : "2020-01-30T21:21:44Z",
"aliases" : [ "CVE-2020-5222" ],
"summary" : "Hard-Coded Key Used For Remember-me Token in Opencast",
"details" : "### Impact\n\nThe security configuration in `etc/security/mh_default_org.xml` enables a remember-me cookie based on a hash created from the [username, password, and an additional system key](https://docs.spring.io/spring-security/site/docs/3.0.x/reference/remember-me.html). Opencast has hard-coded this system key in the large XML file and never mentions to change this, basically ensuring that all systems use the same key:\n\n```xml\n<sec:remember-me key=\"opencast\" user-service-ref=\"userDetailsService\" />\n```\n\nThis means that an attacker getting access to a remember-me token for one server can get access to all servers which allow log-in using the same credentials without ever needing the credentials. For example, a remember-me token obtained from develop.opencast.org can be used on stable.opencast.org without actually knowing the log-in credentials.\n\nSuch an attack will usually not work on different installations – assuming that safe, unique passwords are used – but it is basically guaranteed to work to get access to all machines of one cluster if a token from one machine is compromised.\n\n### Patches\n\nThis problem is fixed in Opencast 7.6 and Opencast 8.1\n\n### Workarounds\n\nWe strongly recommend updating to the patched version. Still, as a workaround for older versions, in `etc/security/mh_default_org.xml`, set a custom key for each server:\n\n```xml\n<sec:remember-me key=\"CUSTOM_RANDOM_KEY\" user-service-ref=\"userDetailsService\" />\n```\n\n### References\n\n- [Relevant lines in the security configuration](https://github.com/opencast/opencast/blob/161ee619382f144dc35eea211fc6b556025b98e1/etc/security/mh_default_org.xml#L335-L336)\n- [Spring Security Remember-Me Authentication Documentation](https://docs.spring.io/spring-security/site/docs/3.0.x/reference/remember-me.html#remember-me-hash-token)\n\n### For more information\nIf you have any questions or comments about this advisory:\n- Open an issue in [opencast/opencast](https://github.com/opencast/opencast/issues)\n- For security-relevant information, email us at [security@opencast.org](mailto:security@opencast.org)\n\n### Thanks\nThanks to @LukasKalbertodt for reporting the issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.opencastproject:opencast-kernel"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.opencastproject:opencast-kernel"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0"
}, {
"fixed" : "8.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/opencast/opencast/security/advisories/GHSA-mh8g-hprg-8363"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-5222"
}, {
"type" : "WEB",
"url" : "https://github.com/opencast/opencast/commit/1a7172c95af8d542a77ae5b153e4c834dd4788a6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-798" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-01-30T20:48:17Z",
"nvd_published_at" : null
}
}