Vulnerabilities in pkg:maven/org.glassfish/javax.el
PACKAGECVE-2021-28170 is a MODERATE (CVSS 5.3) improper input validation vulnerability (CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')) affecting El ri libraries in the Maven ecosystem. The issue involves improper input validation in jakarta expression language. Remediation is available by upgrading affected packages to version 3.0.4.
pkg:maven/org.glassfish/javax.el
Vulnerability advisories affecting package pkg:maven/org.glassfish/javax.el. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-v6w3-2prq-h95f | CVE-2021-28170 | MODERATE | Improper Input Validation in Jakarta Expression Language |
CVE-2021-28170 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:N/I:L/A:N).
How to Fix CVE-2021-28170
To remediate this vulnerability, upgrade all affected El ri 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>com.sun.el</groupId>
<artifactId>el-ri</artifactId>
<version>3.0.4</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.el</artifactId>
<version>3.0.4</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<version>Latest secure release</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=com.sun.el
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2021-28170, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=com.sun.el
Analyze the terminal output to locate any version of El ri in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.4), your application is affected.
Note: The mvn dependency:tree -Dincludes=com.sun.el 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-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection'), where the product constructs all or part of an expression language (el) statement in a framework such as a java server page (jsp) using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended el statement before it is executed. In El ri, 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-28170 Affected El ri Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
com.sun.el:el-ri
|
Maven |
< 3.0.4
|
3.0.4
|
|
org.glassfish:jakarta.el
|
Maven |
< 3.0.4
|
3.0.4
|
|
org.glassfish:javax.el
|
Maven |
≤ 3.0.1-b12
|
|
References
Frequently Asked Questions
What is CVE-2021-28170?
Which El ri versions are affected?
What version fixes CVE-2021-28170?
Is el-ri affected?
Is jakarta.el affected?
What is the CVSS score of CVE-2021-28170?
What CWE is associated with CVE-2021-28170?
How can I check Maven dependencies for CVE-2021-28170?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v6w3-2prq-h95f",
"modified" : "2025-07-01T16:13:50Z",
"published" : "2021-10-06T17:48:38Z",
"aliases" : [ "CVE-2021-28170" ],
"summary" : "Improper Input Validation in Jakarta Expression Language",
"details" : "In the Jakarta Expression Language implementation 3.0.3 and earlier, a bug in the ELParserTokenManager enables invalid EL expressions to be evaluated as if they were valid.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "com.sun.el:el-ri"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.0.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.glassfish:jakarta.el"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.0.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.glassfish:javax.el"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "3.0.1-b12"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-28170"
}, {
"type" : "WEB",
"url" : "https://github.com/eclipse-ee4j/el-ri/issues/155"
}, {
"type" : "WEB",
"url" : "https://github.com/eclipse-ee4j/el-ri/pull/160/commits/b6a3943ac5fba71cbc6719f092e319caa747855b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/eclipse-ee4j/el-ri"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JAVA-ORGGLASSFISH-1297098"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JAVA-ORGGLASSFISH-2841368"
}, {
"type" : "ADVISORY",
"url" : "https://securitylab.github.com/advisories/GHSL-2020-021-jakarta-el"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuapr2022.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-917" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-10-06T13:31:54Z",
"nvd_published_at" : "2021-05-26T22:15:00Z"
}
}