# CVE-2026-42045: LobeHub: Cross-Site Scripting(XSS) escalate to Remote Code Execution(RCE)


- **Severity:** Medium 6.2 (`CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Fix available:** No
- **Published:** 12 May 2026
- **Updated:** 12 May 2026
- **Also known as:** GHSA-xq4x-622m-q8fq

## What is CVE-2026-42045?

CVE-2026-42045 is a medium-severity vulnerability in lobehub, published on 12 May 2026. 

### Official description

LobeHub is a work-and-lifestyle space to find, build, and collaborate with agent teammates that grow with you. Prior to 2.1.48, when LobeChat processes custom tags in the Render process of src/features/Portal/Artifacts/Body/Renderer/index.tsx, if no type match is found, it will choose to call the default method, HTMLRenderer, for HTML rendering. If an attacker can induce the LLM to output content containing malicious tags, an XSS vulnerability can be created on the client side. Additionally, Lobechat's Electron main process exposes an IPC interface called runCommand, used to invoke system commands. This interface allows arbitrary command execution and does not filter the command parameter. Therefore, if an attacker can obtain a handle to window.parent.electronAPI via XSS and call the runCommand method of the IPC, the ipcMain process can execute arbitrary system commands with the current user's privileges. This vulnerability is fixed in 2.1.48.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

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

2 open source packages ship an affected version, including @lobehub/lobehub.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@lobehub/lobehub` | npm | All versions to 2.1.26 | None |
| `@lobehub/lobehub` | npm | All versions to 2.1.26 | None |

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

No fix has been published for CVE-2026-42045 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-42045 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-42045 is a medium-severity vulnerability in lobehub, published on 12 May 2026. 
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42045 exists.

Affected packages and fixed versions:
- @lobehub/lobehub (npm): affected all versions up to 2.1.26; no fix listed
- @lobehub/lobehub (npm): affected all versions up to 2.1.26; no fix listed

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

## Sources

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

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