# CVE-2021-33604: Reflected cross-site scripting in development mode handler in Vaadin 14, 15-19

> Attackers can execute arbitrary JavaScript via crafted URLs in Vaadin development mode, requiring the feature to be enabled.

- **Severity:** Low 2.5 (`CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 24 Jun 2021
- **Updated:** 17 Sep 2024
- **Also known as:** GHSA-c99r-67x4-whj6

## What is CVE-2021-33604?

CVE-2021-33604 is a low-severity cross-site scripting vulnerability in Vaadin, published on 24 Jun 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

URL encoding error in development mode handler in com.vaadin:flow-server versions 2.0.0 through 2.6.1 (Vaadin 14.0.0 through 14.6.1), 3.0.0 through 6.0.9 (Vaadin 15.0.0 through 19.0.8) allows local user to execute arbitrary JavaScript code by opening crafted URL in browser.

Weakness: CWE-172 (Improper Encoding or Decoding of Data)

## Which versions are affected by CVE-2021-33604?

4 open source packages ship an affected version, including com.vaadin:vaadin-bom. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.vaadin:vaadin-bom` | Maven | From 14.0.0 | 14.6.2 |
| `com.vaadin:vaadin-bom` | Maven | From 14.0.0 | 14.6.2 |
| `com.vaadin:vaadin-bom` | Maven | From 15.0.0 | 19.0.9 |
| `com.vaadin:vaadin-bom` | Maven | From 15.0.0 | 19.0.9 |

Products: Vaadin Flow-Server, Vaadin Vaadin.

## How do I fix CVE-2021-33604?

Upgrade com.vaadin:vaadin-bom to a fixed version for your release line: 14.6.2 or 19.0.9.

## Is CVE-2021-33604 being exploited?

There is no known exploitation of CVE-2021-33604 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-33604 and fix it if it is affected.

What it is: CVE-2021-33604 is a low-severity cross-site scripting vulnerability in Vaadin, published on 24 Jun 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2021-33604 in the wild and no public exploit code.

Affected packages and fixed versions:
- com.vaadin:vaadin-bom (Maven): affected from 14.0.0; fixed in 14.6.2
- com.vaadin:vaadin-bom (Maven): affected from 14.0.0; fixed in 14.6.2
- com.vaadin:vaadin-bom (Maven): affected from 15.0.0; fixed in 19.0.9
- com.vaadin:vaadin-bom (Maven): affected from 15.0.0; fixed in 19.0.9

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-33604/ (Markdown: https://insights.sbomify.com/CVE-2021-33604/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-33604
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-33604
- OSV: https://osv.dev/vulnerability/CVE-2021-33604

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-33604/
Summaries are generated and may contain mistakes; the official description above is the record.
