CVE-2021-31412: Vaadin bom Possible Route Enumeration Vulnerability

MODERATE
Advisory Identifier: GHSA-qrg9-f472-qwfm
CVSS 5.3
CWE-668 CWE-20 CWE-1295
Published
Advisory Summary

CVE-2021-31412 is a MODERATE (CVSS 5.3) possible route enumeration vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Vaadin bom libraries in the Maven ecosystem. The issue involves possible route enumeration in production mode via routenotfounderror view in vaadin 10, 11-14, and 15-19. Remediation is available by upgrading affected packages to version 10.0.19, 14.6.2, 19.0.9.

CVE-2021-31412 at a Glance

CVE Identifier CVE-2021-31412
GHSA Identifier GHSA-qrg9-f472-qwfm
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product Vaadin bom
Package Ecosystem Maven
Published Date
Last Updated

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).

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

How to Fix CVE-2021-31412

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.

com.vaadin:vaadin-bom fixed: 10.0.19
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-bom</artifactId>
    <version>10.0.19</version>
</dependency>
com.vaadin:vaadin-bom fixed: 14.6.2
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-bom</artifactId>
    <version>14.6.2</version>
</dependency>
com.vaadin:vaadin-bom fixed: 19.0.9
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-bom</artifactId>
    <version>19.0.9</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=com.vaadin

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2021-31412, 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 10.0.19), 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-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 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

Improper sanitization of path in default `RouteNotFoundError` view in `com.vaadin:flow-server` versions 1.0.0 through 1.0.14 (Vaadin 10.0.0 through 10.0.18), 1.1.0 prior to 2.0.0 (Vaadin 11 prior to 14), 2.0.0 through 2.6.1 (Vaadin 14.0.0 through 14.6.1), and 3.0.0 through 6.0.9 (Vaadin 15.0.0 through 19.0.8) allows network attacker to enumerate all available routes via crafted HTTP request when application is running in production mode and no custom handler for `NotFoundException` is provided. - https://vaadin.com/security/cve-2021-31412

CVE-2021-31412 Affected Vaadin bom Versions

3 component(s)
Fixed Versions:
10.0.1914.6.219.0.9
Product / Package Ecosystem Affected Versions Fixed Version
com.vaadin:vaadin-bom
Maven
≥ 10.0.0
< 10.0.19
10.0.19
com.vaadin:vaadin-bom
Maven
≥ 11.0.0
< 14.6.2
14.6.2
com.vaadin:vaadin-bom
Maven
≥ 15.0.0
< 19.0.9
19.0.9

References

Frequently Asked Questions

What is CVE-2021-31412?
CVE-2021-31412 is a security vulnerability in Vaadin bom involving Possible route enumeration in production mode via RouteNotFoundError view in Vaadin 10, 11-14, and 15-19 under CWE-668: Exposure of Resource to Wrong Sphere.
Which Vaadin bom versions are affected?
Affected versions include releases prior to 10.0.19, 14.6.2, 19.0.9 across affected packages: com.vaadin:vaadin-bom.
What version fixes CVE-2021-31412?
Upgrading to 10.0.19, 14.6.2, 19.0.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is vaadin-bom affected?
Yes, com.vaadin:vaadin-bom is affected in releases prior to 10.0.19, 14.6.2, 19.0.9. Upgrade your dependency to 10.0.19, 14.6.2, 19.0.9 or later.
What is the CVSS score of CVE-2021-31412?
CVE-2021-31412 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2021-31412?
CVE-2021-31412 is classified under CWE-668: Exposure of Resource to Wrong Sphere (The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.).
How can I check Maven dependencies for CVE-2021-31412?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.vaadin'. 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-qrg9-f472-qwfm",
  "modified" : "2021-06-24T19:46:19Z",
  "published" : "2021-06-28T16:55:58Z",
  "aliases" : [ "CVE-2021-31412" ],
  "summary" : "Possible route enumeration in production mode via RouteNotFoundError view in Vaadin 10, 11-14, and 15-19",
  "details" : "Improper sanitization of path in default `RouteNotFoundError` view in `com.vaadin:flow-server` versions 1.0.0 through 1.0.14 (Vaadin 10.0.0 through 10.0.18), 1.1.0 prior to 2.0.0 (Vaadin 11 prior to 14), 2.0.0 through 2.6.1 (Vaadin 14.0.0 through 14.6.1), and 3.0.0 through 6.0.9 (Vaadin 15.0.0 through 19.0.8) allows network attacker to enumerate all available routes via crafted HTTP request when application is running in production mode and no custom handler for `NotFoundException` is provided.\n\n- https://vaadin.com/security/cve-2021-31412",
  "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" : "com.vaadin:vaadin-bom"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.0.0"
      }, {
        "fixed" : "10.0.19"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 10.0.18"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.vaadin:vaadin-bom"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "11.0.0"
      }, {
        "fixed" : "14.6.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 14.0.0"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.vaadin:vaadin-bom"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "15.0.0"
      }, {
        "fixed" : "19.0.9"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 19.0.8"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/vaadin/platform/security/advisories/GHSA-qrg9-f472-qwfm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-31412"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vaadin/flow/pull/11107"
  }, {
    "type" : "WEB",
    "url" : "https://vaadin.com/security/cve-2021-31412"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1295", "CWE-20", "CWE-668" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-06-24T19:46:19Z",
    "nvd_published_at" : "2021-06-24T12:15:00Z"
  }
}