# CVE-2026-41862: Spring Statemachine's Kryo-based persistence backends deserialize persisted state-machine contexts without enforcing a class allowlist

> Attackers can achieve remote code execution by exploiting unsafe Kryo deserialization in Spring Statemachine persistence backends.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Jun 2026
- **Updated:** 24 Jun 2026
- **Also known as:** GHSA-85qj-f5wg-rwp9

## What is CVE-2026-41862?

CVE-2026-41862 is a high-severity unsafe deserialization vulnerability in Spring Statemachine, published on 23 Jun 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Spring Statemachine's Kryo-based persistence backends (JPA, MongoDB, Redis and ZooKeeper) deserialise persisted state-machine contexts without enforcing a class allowlist (CWE-502, deserialisation of untrusted data), which can lead to remote code execution inside the application JVM.

Affected versions:
Spring Statemachine 4.0.0 through 4.0.1
Spring Statemachine 3.2.0 through 3.2.4

Weakness: CWE-502 (Deserialization of Untrusted Data)

## Which versions are affected by CVE-2026-41862?

4 open source packages ship an affected version, including org.springframework.statemachine:spring-statemachine-kryo. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework.statemachine:spring-statemachine-kryo` | Maven | From 3.2.0 to 3.2.4 | None |
| `org.springframework.statemachine:spring-statemachine-kryo` | Maven | From 3.2.0 to 3.2.4 | None |
| `org.springframework.statemachine:spring-statemachine-kryo` | Maven | From 4.0.0 | 4.0.2 |
| `org.springframework.statemachine:spring-statemachine-kryo` | Maven | From 4.0.0 | 4.0.2 |

Products: Broadcom Spring Statemachine.

## How do I fix CVE-2026-41862?

Upgrade org.springframework.statemachine:spring-statemachine-kryo to 4.0.2 or later.

## Is CVE-2026-41862 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-41862 and fix it if it is affected.

What it is: CVE-2026-41862 is a high-severity unsafe deserialization vulnerability in Spring Statemachine, published on 23 Jun 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-41862 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.springframework.statemachine:spring-statemachine-kryo (Maven): affected from 3.2.0 up to 3.2.4; no fix listed
- org.springframework.statemachine:spring-statemachine-kryo (Maven): affected from 3.2.0 up to 3.2.4; no fix listed
- org.springframework.statemachine:spring-statemachine-kryo (Maven): affected from 4.0.0; fixed in 4.0.2
- org.springframework.statemachine:spring-statemachine-kryo (Maven): affected from 4.0.0; fixed in 4.0.2

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-2026-41862/ (Markdown: https://insights.sbomify.com/CVE-2026-41862/index.md)
```

## Sources

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

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