CVE-2021-20289: Resteasy core Exposure Of Class Information Vulnerability
MODERATECVE-2021-20289 is a MODERATE (CVSS 5.3) exposure of class information vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Resteasy core libraries in the Maven ecosystem. The issue involves exposure of class information in resteasy. Remediation is available by upgrading affected packages to version 4.6.1, 4.5.10, 3.16.0.
CVE-2021-20289 at a Glance
Security Impact
CVSS: 5.3
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:L/I:N/A:N).
How to Fix CVE-2021-20289
To remediate this vulnerability, upgrade all affected Resteasy core 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.jboss.resteasy</groupId>
<artifactId>resteasy-core</artifactId>
<version>4.6.1</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-core</artifactId>
<version>4.5.10</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-core</artifactId>
<version>3.16.0</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.jboss.resteasy
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2021-20289, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.jboss.resteasy
Analyze the terminal output to locate any version of Resteasy core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.6.1), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.jboss.resteasy 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-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In Resteasy core, 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-2021-20289 Affected Resteasy core Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.jboss.resteasy:resteasy-core
|
Maven |
≥ 4.6.0
< 4.6.1
|
4.6.1
|
|
org.jboss.resteasy:resteasy-core
|
Maven |
≥ 4.0.0
< 4.5.10
|
4.5.10
|
|
org.jboss.resteasy:resteasy-core
|
Maven |
≥ 3.0.0
< 3.16.0
|
3.16.0
|
References
Frequently Asked Questions
What is CVE-2021-20289?
Which Resteasy core versions are affected?
What version fixes CVE-2021-20289?
Is resteasy-core affected?
What is the CVSS score of CVE-2021-20289?
What CWE is associated with CVE-2021-20289?
How can I check Maven dependencies for CVE-2021-20289?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-244r-fcj3-ghjq",
"modified" : "2022-04-22T15:49:36Z",
"published" : "2021-04-07T21:51:33Z",
"aliases" : [ "CVE-2021-20289" ],
"summary" : "Exposure of class information in RESTEasy",
"details" : "A flaw was found in RESTEasy in all current versions of RESTEasy up to 4.6.0.Final. The endpoint class and method names are returned as part of the exception response when RESTEasy cannot convert one of the request URI path or query values to the matching JAX-RS resource method's parameter value. The highest threat from this vulnerability is to data confidentiality.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.jboss.resteasy:resteasy-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.6.0"
}, {
"fixed" : "4.6.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.jboss.resteasy:resteasy-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.5.10"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.jboss.resteasy:resteasy-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.16.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-20289"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1935927"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1941544"
}, {
"type" : "WEB",
"url" : "https://issues.redhat.com/browse/RESTEASY-2843"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20210528-0008"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuapr2022.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-209", "CWE-668" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-03-31T22:37:48Z",
"nvd_published_at" : "2021-03-26T17:15:00Z"
}
}