# GHSA-c57f-4vp2-jqhm: Insecure temporary directory usage in frontend build functionality of Vaadin 14 and 15-19

> Local attackers can inject malicious code into frontend resources during application rebuilds due to insecure temporary directory usage in Vaadin.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 May 2021

## What is GHSA-c57f-4vp2-jqhm?

GHSA-c57f-4vp2-jqhm is a path traversal vulnerability in com.vaadin:flow-server, published on 6 May 2021. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

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.

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

## Which versions are affected by GHSA-c57f-4vp2-jqhm?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.vaadin:flow-server` | Maven | From 2.0.9 | 2.5.3 |
| `com.vaadin:flow-server` | Maven | From 2.0.9 | 2.5.3 |
| `com.vaadin:flow-server` | Maven | From 3.0.0 | 6.0.6 |
| `com.vaadin:flow-server` | Maven | From 3.0.0 | 6.0.6 |

## How do I fix GHSA-c57f-4vp2-jqhm?

Upgrade com.vaadin:flow-server to a fixed version for your release line: 2.5.3 or 6.0.6.

## Is GHSA-c57f-4vp2-jqhm being exploited?

There is no known exploitation of GHSA-c57f-4vp2-jqhm in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-c57f-4vp2-jqhm and fix it if it is affected.

What it is: GHSA-c57f-4vp2-jqhm is a path traversal vulnerability in com.vaadin:flow-server, published on 6 May 2021. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-c57f-4vp2-jqhm in the wild and no public exploit code.

Affected packages and fixed versions:
- com.vaadin:flow-server (Maven): affected from 2.0.9; fixed in 2.5.3
- com.vaadin:flow-server (Maven): affected from 2.0.9; fixed in 2.5.3
- com.vaadin:flow-server (Maven): affected from 3.0.0; fixed in 6.0.6
- com.vaadin:flow-server (Maven): affected from 3.0.0; fixed in 6.0.6

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-c57f-4vp2-jqhm/ (Markdown: https://insights.sbomify.com/GHSA-c57f-4vp2-jqhm/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-c57f-4vp2-jqhm

---
From sbomify Insights: https://insights.sbomify.com/GHSA-c57f-4vp2-jqhm/
Summaries are generated and may contain mistakes; the official description above is the record.
