CVE-2026-42045
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedLobeHub 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceLobeChat versions prior to 2.1.48 contain a stored XSS vulnerability in the artifact rendering component where custom tags without type matches default to an unsafe HTMLRenderer, allowing injection of malicious scripts. This XSS can be chained with an exposed Electron IPC interface (runCommand) that executes arbitrary system commands without parameter validation, enabling privilege escalation to the current user's context.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- High
- Privileges
- High
- User interaction
- Required
- Scope
- Changed
- Confidentiality
- High
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:L/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Determine installed LobeChat versionIf running as a desktop Electron app, check the application menu About section or inspect the main.js/app.js for version string. If installed via npm, run 'npm list lobe-chat' or check the local package.json version field. Compare this version number to 2.1.48.Affected if Installed version is less than 2.1.48 (e.g., 2.1.47, 2.1.0, 1.x.x)
-
Verify artifact rendering feature is enabledInspect the LobeChat configuration files or runtime settings for the artifact rendering module. Look for configurations related to 'artifact', 'renderer', or 'HTMLRenderer'. Check if the feature flag or module is actively loaded at runtime.Affected if Artifact rendering component is enabled and loaded in the current deployment
-
Identify if custom tags can be injected into artifact contentReview the artifact rendering code or configuration to determine whether user-supplied or LLM-generated content with custom HTML tags is processed. Check for the presence of custom tag handling that defaults to HTMLRenderer when no type is specified.Affected if Custom tags without a defined type are rendered using the default HTMLRenderer (unspecified tag types fall through to unsafe rendering)
-
Check Electron IPC runCommand exposureInspect the main process Electron code (main.js, preload.js, or equivalent) for the 'runCommand' IPC handler. Verify whether this interface is exposed to the renderer process and whether it lacks parameter validation or whitelisting of executable commands.Affected if The 'runCommand' IPC interface is exposed to the renderer and accepts arbitrary system commands without validation
You are affected if LobeChat version is below 2.1.48 AND the artifact rendering feature is active with custom tag support that defaults to HTMLRenderer, combined with an exposed unvalidated runCommand IPC interface enabling privilege escalation.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade to LobeChat version 2.1.48 or later. Additionally, implement Content Security Policy headers and validate/sanitize all LLM-generated content before rendering.
LobeHub/LobeChat version 2.1.48
- Upgrade LobeHub/LobeChat to version 2.1.48 or later
- Verify the upgrade was successful by checking the application version
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation8.0 h
- Testing6.0 h
- Review / QA4.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $6,176.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-42045 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-42045 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data