CVE-2021-31411: Vaadin bom Insecure Temporary Directory Usage Vulnerability
HIGHCVE-2021-31411 is a HIGH (CVSS 6.3) insecure temporary directory usage vulnerability (CWE-379: Creation of Temporary File in Directory with Insecure Permissions) affecting Vaadin bom libraries in the Maven ecosystem. The issue involves insecure temporary directory usage in frontend build functionality of vaadin 14 and 15-19. Remediation is available by upgrading affected packages to version 14.5.3, 19.0.5.
CVE-2021-31411 at a Glance
Security Impact
CVSS: 6.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2021-31411
To remediate this vulnerability, upgrade all affected Vaadin bom 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.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>14.5.3</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>19.0.5</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.vaadin
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2021-31411, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=com.vaadin
Analyze the terminal output to locate any version of Vaadin bom in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 14.5.3), your application is affected.
Note: The mvn dependency:tree -Dincludes=com.vaadin 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-379: Creation of Temporary File in Directory with Insecure Permissions, where the product creates a temporary file in a directory whose permissions allow unintended actors to determine the file's existence or otherwise access that file. In Vaadin bom, 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-31411 Affected Vaadin bom Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
com.vaadin:vaadin-bom
|
Maven |
≥ 14.0.3
< 14.5.3
|
14.5.3
|
|
com.vaadin:vaadin-bom
|
Maven |
≥ 15.0.0
< 19.0.5
|
19.0.5
|
References
Frequently Asked Questions
What is CVE-2021-31411?
Which Vaadin bom versions are affected?
What version fixes CVE-2021-31411?
Is vaadin-bom affected?
What is the CVSS score of CVE-2021-31411?
What CWE is associated with CVE-2021-31411?
How can I check Maven dependencies for CVE-2021-31411?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-p826-8vhq-h439",
"modified" : "2021-05-19T17:41:45Z",
"published" : "2021-05-06T15:27:12Z",
"aliases" : [ "CVE-2021-31411" ],
"summary" : "Insecure temporary directory usage in frontend build functionality of Vaadin 14 and 15-19",
"details" : "Insecure temporary directory usage in frontend build functionality of `com.vaadin:flow-server` versions 2.0.9 through 2.5.2 (Vaadin 14.0.3 through Vaadin 14.5.2), 3.0 prior to 6.0 (Vaadin 15 prior to 19), and 6.0.0 through 6.0.5 (Vaadin 19.0.0 through 19.0.4) allows local users to inject malicious code into frontend resources during application rebuilds.\n\n- https://vaadin.com/security/cve-2021-31411",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "com.vaadin:vaadin-bom"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "14.0.3"
}, {
"fixed" : "14.5.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 14.5.2"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "com.vaadin:vaadin-bom"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.0.0"
}, {
"fixed" : "19.0.5"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 19.0.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vaadin/platform/security/advisories/GHSA-p826-8vhq-h439"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-31411"
}, {
"type" : "WEB",
"url" : "https://github.com/vaadin/flow/pull/10640"
}, {
"type" : "WEB",
"url" : "https://vaadin.com/security/cve-2021-31411"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-379" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-04T17:54:40Z",
"nvd_published_at" : "2021-05-05T19:15:00Z"
}
}