# GHSA-crh4-294p-vcfq: Regular expression denial of service (ReDoS) in EmailField component in Vaadin 14 and 15-17

> Attackers can cause denial of service in Vaadin applications by submitting malicious email addresses to the EmailField component.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Apr 2021

## What is GHSA-crh4-294p-vcfq?

GHSA-crh4-294p-vcfq is a denial of service vulnerability in com.vaadin:vaadin-text-field-flow, published on 19 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Unsafe validation RegEx in `EmailField` component in `com.vaadin:vaadin-text-field-flow` versions 2.0.4 through 2.3.2 (Vaadin 14.0.6 through 14.4.3), and 3.0.0 through 4.0.2 (Vaadin 15.0.0 through 17.0.10) allows attackers to cause uncontrolled resource consumption by submitting malicious email addresses.

- https://vaadin.com/security/cve-2021-31405

## Which versions are affected by GHSA-crh4-294p-vcfq?

4 open source packages ship an affected version, including com.vaadin:vaadin-text-field-flow.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.vaadin:vaadin-text-field-flow` | Maven | From 2.0.4 | 2.3.3 |
| `com.vaadin:vaadin-text-field-flow` | Maven | From 2.0.4 | 2.3.3 |
| `com.vaadin:vaadin-text-field-flow` | Maven | From 3.0.0 | 4.0.3 |
| `com.vaadin:vaadin-text-field-flow` | Maven | From 3.0.0 | 4.0.3 |

## How do I fix GHSA-crh4-294p-vcfq?

Upgrade com.vaadin:vaadin-text-field-flow to a fixed version for your release line: 2.3.3 or 4.0.3.

## Is GHSA-crh4-294p-vcfq being exploited?

There is no known exploitation of GHSA-crh4-294p-vcfq in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-crh4-294p-vcfq and fix it if it is affected.

What it is: GHSA-crh4-294p-vcfq is a denial of service vulnerability in com.vaadin:vaadin-text-field-flow, published on 19 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-crh4-294p-vcfq in the wild and no public exploit code.

Affected packages and fixed versions:
- com.vaadin:vaadin-text-field-flow (Maven): affected from 2.0.4; fixed in 2.3.3
- com.vaadin:vaadin-text-field-flow (Maven): affected from 2.0.4; fixed in 2.3.3
- com.vaadin:vaadin-text-field-flow (Maven): affected from 3.0.0; fixed in 4.0.3
- com.vaadin:vaadin-text-field-flow (Maven): affected from 3.0.0; fixed in 4.0.3

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/GHSA-crh4-294p-vcfq/ (Markdown: https://insights.sbomify.com/GHSA-crh4-294p-vcfq/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-crh4-294p-vcfq

---
From sbomify Insights: https://insights.sbomify.com/GHSA-crh4-294p-vcfq/
Summaries are generated and may contain mistakes; the official description above is the record.
