# GHSA-6hgr-2g6q-3rmc: Server session is not invalidated when logout() helper method of Authentication module is used in Vaadin 18-19

> Attackers can access protected endpoints after logout due to session invalidation failure when using Spring Security CSRF protection.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 22 Apr 2021

## What is GHSA-6hgr-2g6q-3rmc?

GHSA-6hgr-2g6q-3rmc is an authentication bypass vulnerability in com.vaadin:flow-client, published on 22 Apr 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

`Authentication.logout()` helper in `com.vaadin:flow-client` versions 5.0.0 prior to 6.0.0 (Vaadin 18), and 6.0.0 through 6.0.4 (Vaadin 19.0.0 through 19.0.3) uses incorrect HTTP method, which, in combination with Spring Security CSRF protection, allows local attackers to access Fusion endpoints after the user attempted to log out.

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

## Which versions are affected by GHSA-6hgr-2g6q-3rmc?

2 open source packages ship an affected version, including com.vaadin:flow-client.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.vaadin:flow-client` | Maven | From 5.0.0 | 6.0.5 |
| `com.vaadin:flow-client` | Maven | From 5.0.0 | 6.0.5 |

## How do I fix GHSA-6hgr-2g6q-3rmc?

Upgrade com.vaadin:flow-client to 6.0.5 or later.

## Is GHSA-6hgr-2g6q-3rmc being exploited?

There is no known exploitation of GHSA-6hgr-2g6q-3rmc in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-6hgr-2g6q-3rmc and fix it if it is affected.

What it is: GHSA-6hgr-2g6q-3rmc is an authentication bypass vulnerability in com.vaadin:flow-client, published on 22 Apr 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-6hgr-2g6q-3rmc in the wild and no public exploit code.

Affected packages and fixed versions:
- com.vaadin:flow-client (Maven): affected from 5.0.0; fixed in 6.0.5
- com.vaadin:flow-client (Maven): affected from 5.0.0; fixed in 6.0.5

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-6hgr-2g6q-3rmc/ (Markdown: https://insights.sbomify.com/GHSA-6hgr-2g6q-3rmc/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-6hgr-2g6q-3rmc

---
From sbomify Insights: https://insights.sbomify.com/GHSA-6hgr-2g6q-3rmc/
Summaries are generated and may contain mistakes; the official description above is the record.
