Skip to content

GHSA-jqj4-r483-4gvr

Reflected cross-site scripting in default RouteNotFoundError view in Vaadin 10 and 11-13

Medium Maven
Severity
6.1 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
—
No score published
Known exploited
No
Not in CISA's catalog
Weakness
CWE-81 Improper Neutralization of Script in an Error Message Web Page
Fix
10.0.14
Upgrade com.vaadin:vaadin-bom to this version or later

Description

Missing output sanitization in default RouteNotFoundError view in com.vaadin:flow-server versions 1.0.0 through 1.0.10 (Vaadin 10.0.0 through 10.0.13), and 1.1.0 through 1.4.2 (Vaadin 11.0.0 through 13.0.5) allows attacker to execute malicious JavaScript via crafted URL.

Affected versions

Maven

PackageVulnerableFixed in
com.vaadin:vaadin-bom
>= 10.0.0, < 10.0.14
10.0.14
com.vaadin:vaadin-bom
>= 11.0.0, < 13.0.6
13.0.6

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

com.vaadin:vaadin-bom Maven → 10.0.14

maven
<dependency><groupId>com.vaadin</groupId><artifactId>vaadin-bom</artifactId><version>10.0.14</version></dependency>
gradle
implementation("com.vaadin:vaadin-bom:10.0.14")

Severity breakdown

CVSS 3.1 6.1

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Weakness

CWE-81: Improper Neutralization of Script in an Error Message Web Page

The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters that could be interpreted as web-scripting elements when they are sent to an error page.

How to prevent it
  • Implementation: Do not write user-controlled input to error pages.
  • Implementation: Carefully check each input parameter against a rigorous positive specification (allowlist) defining the specific characters and format allowed. All input should be neutralized, not just parameters that the user is supposed to specify, but all data in the request, including hidden fields, cookies, headers, the URL itself, and so forth. A common mistake that leads to continuing XSS vulnerabilities is to validate only fields that are expected to be redisplayed by the site. We often encounter data from the request that is reflected by the application server or the application that the development team did not anticipate. Also, a field that is not currently reflected may be used by a future developer. Therefore, validating ALL parts of the HTTP request is recommended.
  • Implementation: Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even if they are not special in the original encoding. Attackers might then be able to exploit this discrepancy and conduct injection attacks; they even might be able to bypass protection mechanisms that assume the original encoding is also being used by the downstream component. The problem of inconsistent output encodings often arises in web pages. If an encoding is not specified in an HTTP header, web browsers often guess about which encoding is being used. This can open up the browser to subtle XSS attacks.
  • Implementation: With Struts, write all data from form beans with the bean's filter attribute set to true.
  • Implementation: To help mitigate XSS attacks against the user's session cookie, set the session cookie to be HttpOnly. In browsers that support the HttpOnly feature (such as more recent versions of Internet Explorer and Firefox), this attribute can prevent the user's session cookie from being accessible to malicious client-side scripts that use document.cookie. This is not a complete solution, since HttpOnly is not supported by all browsers. More importantly, XmlHttpRequest and other powerful browser technologies provide read access to HTTP headers, including the Set-Cookie header in which the HttpOnly flag is set.

References

Timeline

  1. Published
  2. Last updated by the source
AdvisorySeverityWhy it's related
GHSA-93c4-vf86-3rj7
Reflected cross-site scripting in vaadin-menu-bar webjar resources in Vaadin 14
Medium Also affects com.vaadin:vaadin-bom
GHSA-jfmf-w293-8xr8
Regular expression Denial of Service (ReDoS) in EmailValidator class in V7 compatibility module in Vaadin 8
High Also affects com.vaadin:vaadin-bom
GHSA-hw7r-qrhp-5pff
Unauthorized property update in CheckboxGroup component in Vaadin 12-14 and 15-20
Medium Also affects com.vaadin:vaadin-bom
GHSA-c99r-67x4-whj6
Reflected cross-site scripting in development mode handler in Vaadin 14, 15-19
Low Also affects com.vaadin:vaadin-bom
GHSA-qrg9-f472-qwfm
Possible route enumeration in production mode via RouteNotFoundError view in Vaadin 10, 11-14, and 15-19
Medium Also affects com.vaadin:vaadin-bom
GHSA-p826-8vhq-h439
Insecure temporary directory usage in frontend build functionality of Vaadin 14 and 15-19
Medium Also affects com.vaadin:vaadin-bom
GHSA-mr8h-j9cv-4m8h
Server session is not invalidated when logout() helper method of Authentication module is used in Vaadin 18-19
Medium Also affects com.vaadin:vaadin-bom
GHSA-75xc-qvxh-27f8
Timing side channel vulnerability in UIDL request handler in Vaadin 7 and 8
Medium Also affects com.vaadin:vaadin-bom
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor