# CVE-2023-38286: Spring-boot-admin sandbox bypass via crafted HTML

> Attackers can bypass the Thymeleaf sandbox via crafted HTML, potentially leading to code execution in Spring Boot Admin when specific features are enabled.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:H/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:** 14 Jul 2023
- **Updated:** 30 Oct 2024
- **Also known as:** CLSA-2025-1752019357, CLSA-2025-1764029254, GHSA-7gj7-224w-vpr3, RHLW-2026-81384c14bc892e51

## What is CVE-2023-38286?

CVE-2023-38286 is a high-severity code injection vulnerability in n/a, published on 14 Jul 2023. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Thymeleaf through 3.1.1.RELEASE, as used in spring-boot-admin (aka Spring Boot Admin) through 3.1.1 and other products, allows sandbox bypass via crafted HTML. This may be relevant for SSTI (Server Side Template Injection) and code execution in spring-boot-admin if MailNotifier is enabled and there is write access to environment variables via the UI.

Weakness: CWE-77 (Improper Neutralization of Special Elements used in a Command)

## Which versions are affected by CVE-2023-38286?

4 open source packages ship an affected version, including de.codecentric:spring-boot-admin-server. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `de.codecentric:spring-boot-admin-server` | Maven | All versions | 2.7.16 |
| `de.codecentric:spring-boot-admin-server` | Maven | All versions | 2.7.16 |
| `de.codecentric:spring-boot-admin-server` | Maven | From 3.0.0 | 3.1.2 |
| `de.codecentric:spring-boot-admin-server` | Maven | From 3.0.0 | 3.1.2 |

Products: Codecentric Spring Boot Admin, Thymeleaf Thymeleaf.

## How do I fix CVE-2023-38286?

Upgrade de.codecentric:spring-boot-admin-server to a fixed version for your release line: 2.7.16 or 3.1.2.

## Is CVE-2023-38286 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-38286 exists.

## Other vulnerabilities in n/a

- [CVE-2022-46166](https://insights.sbomify.com/CVE-2022-46166/): Spring Boot Admins integrated notifier support allows arbitrary code execution (high 8.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-38286 and fix it if it is affected.

What it is: CVE-2023-38286 is a high-severity code injection vulnerability in n/a, published on 14 Jul 2023. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-38286 exists.

Affected packages and fixed versions:
- de.codecentric:spring-boot-admin-server (Maven): affected all versions; fixed in 2.7.16
- de.codecentric:spring-boot-admin-server (Maven): affected all versions; fixed in 2.7.16
- de.codecentric:spring-boot-admin-server (Maven): affected from 3.0.0; fixed in 3.1.2
- de.codecentric:spring-boot-admin-server (Maven): affected from 3.0.0; fixed in 3.1.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-2023-38286/ (Markdown: https://insights.sbomify.com/CVE-2023-38286/index.md)
```

## Sources

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

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