Skip to main content

ThingsBoard CVE-2025-34281

MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2025-10-17 596c5446-0ce5-4ba2-aa66-48b3b757a647
6.2
CVSS 4.0 · Vendor: 596c5446-0ce5-4ba2-aa66-48b3b757a647
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as low-privileged user
  2. Delivery
    Upload malicious SVG to Image Gallery
  3. Exploit
    Embed image in dashboard/widget or share public API link
  4. Execution
    Victim's browser loads SVG and runs JavaScript
  5. Impact
    Hijack victim session and perform unauthorized actions

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires an authenticated account with permission to upload images to the ThingsBoard 'Image Gallery' (PR:L), confirming this is a post-authentication flaw. The payload is a malicious SVG that the ImageController serves without restricting embedded JavaScript execution. Triggering requires victim interaction (UI:P): another user must load the SVG - either by accessing the image's public API endpoint or by viewing a dashboard/widget/page where the image is embedded in an iframe during normal operations. Limiting factors: attacker must already hold a valid (even low-privilege) account, a separate victim must passively render the image, and the flaw is fixed in v4.2.1 where a 'default-src none' CSP header blocks script execution. Direct server/data compromise does not occur (VC/VI/VA:N); impact is confined to the victim's browser session.

Impact

This is a stored XSS flaw (CWE-79) in ThingsBoard's ImageController, rated moderate (CVSS 4.0 6.2) rather than critical. The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:P) confirms network reach but requires an authenticated low-privileged user (PR:L) to upload the payload and a victim's passive interaction (UI:P) to trigger it - so it is not a drive-by, unauthenticated compromise. The impact profile is telling: direct vulnerable-system impact is nil (VC:N/VI:N/VA:N) while subsequent-system impact is high confidentiality / low integrity (SC:H/SI:L), reflecting that the real damage is session hijacking and actions performed in other users' browser contexts rather than compromise of the server itself. Exploitation signals are modest and consistent: EPSS is 0.38% (30th percentile), there is no CISA KEV listing, and no public exploit was identified at time of analysis. These low-probability signals align with the elevated prerequisites (authentication plus victim interaction), so this is a genuine-but-not-urgent issue - a real post-authentication privilege-escalation/account-takeover vector in multi-tenant deployments, not a top-priority internet-wide emergency. The vendor fix is confirmed (commit b2ae6f9 adds a 'Content-Security-Policy: default-src none' response header; released in v4.2.1), which independently corroborates the root cause described.

Exploit ScenarioDerived

A low-privileged authenticated tenant user uploads a crafted SVG containing embedded JavaScript to the Image Gallery. When an administrator or another user views that image via its public API endpoint, or opens a dashboard/widget that embeds it in an iframe, the script executes in the victim's authenticated session, enabling session theft and unauthorized actions on their behalf. No public exploit was identified at time of analysis, though the Checkmarx advisory and fix commit document the mechanism.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 19, 2026

Stored cross-site scripting in ThingsBoard's Image Gallery (versions prior to v4.2.1) allows an authenticated user with image-upload permission to plant a malicious SVG that executes JavaScript in another user's browser when the image is loaded through its public API endpoint or embedded in a dashboard/widget iframe during normal operations. The flaw is rated moderate (CVSS 4.0 score 6.2) and requires victim interaction; no public exploit has been identified at time of analysis and EPSS is low at 0.38%. The issue is fixed in v4.2.1 by adding a restrictive Content-Security-Policy header to image responses.

RemediationAI

Vendor-released patch: upgrade to ThingsBoard v4.2.1 or later, which adds the Content-Security-Policy "default-src 'none'" header to image responses as shown in commit b2ae6f92d12206ea185a2e882945a6b69234bf03 (https://github.com/thingsboard/thingsboard/commit/b2ae6f92d12206ea185a2e882945a6b69234bf03) and the v4.2.1 release notes (https://github.com/thingsboard/thingsboard/releases/tag/v4.2.1); the Checkmarx advisory (https://advisory.checkmarx.net/advisory/CVE-2025-34281/) provides additional context. If upgrading immediately is not possible, restrict Image Gallery upload permission to trusted administrators and audit/remove untrusted SVG assets, with the trade-off of reduced collaboration; block SVG uploads entirely or sanitize SVG content before storage, with the trade-off of losing legitimate vector-image functionality; and apply a Content-Security-Policy such as "default-src 'none'" to image-serving responses at a reverse proxy or web server, with the trade-off that improperly scoped CSP rules may affect legitimate embedded content. Because exploitation requires an authenticated uploader and a separate victim to render the image, limiting upload rights and reviewing existing gallery content reduce exposure while the upgrade is scheduled.

Affected Packages

maven org.thingsboard:application fix: 4.2.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in maven

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

ThingsBoard is a Java-based IoT platform, and the vulnerable component is the ImageController, which serves uploaded image content from the platform origin without restricting embedded script execution. This is a stored cross-site scripting issue (CWE-79): SVG is an XML-based image format that can contain <script> elements or event-handler attributes, so an uploaded SVG served by ImageController can execute JavaScript in the browser context of any user who views it. Exploitation requires an authenticated account permitted to upload images to the Image Gallery (PR:L), plus victim interaction to load the image through its public API endpoint or via an iframe embedded in a widget, dashboard, or page. The fix commit b2ae6f92d12206ea185a2e882945a6b69234bf03 adds .header("Content-Security-Policy", "default-src 'none'") to the downloadIfChanged response, blocking script execution for served image content. The CPE cpe:2.3:a:thingsboard:thingsboard:*:*:*:*:*:*:*:* identifies the affected ThingsBoard product family.

Know when Thingsboard gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (596c5446-0ce5-4ba2-aa66-48b3b757a647) PRIMARY 6.2 MEDIUM
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
vuln.today AI 5.4 MEDIUM

Authenticated upload (PR:L) with required victim rendering (UI:R); stored XSS executes across users so scope changes (S:C) with limited session confidentiality/integrity impact and no availability impact.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N

Primary rating from Vendor (596c5446-0ce5-4ba2-aa66-48b3b757a647).

CVSS VectorVendor: 596c5446-0ce5-4ba2-aa66-48b3b757a647

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
Low
Subsequent system: Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.4%
Top 70% exploitable
Prevalence
Medium
popular open-source IoT platform, common but not ubiquitous enterprise footprint
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

31
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +31
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Affected Products (CPE)CVE.org

cpe:2.3:a:thingsboard:thingsboard:*:*:*:*:*:*:*:*
CVE-2023-45303 HIGH POC
8.8 Oct 06

ThingsBoard before 3.5 allows Server-Side Template Injection if users are allowed to modify an email template, because A

CVE-2020-27687 HIGH POC
8.8 Dec 18

ThingsBoard before v3.2 is vulnerable to Host header injection in password-reset emails. Rated high severity (CVSS 8.8),

CVE-2025-34282 MEDIUM POC
6.9 Oct 17

SVG-based server-side request forgery in ThingsBoard versions prior to 4.2.1 allows upload of crafted SVG files containi

CVE-2024-55466 MEDIUM POC
6.5 May 12

An arbitrary file upload vulnerability in the Image Gallery of ThingsBoard Community, ThingsBoard Cloud and ThingsBoard

CVE-2024-3270 MEDIUM POC
6.5 Apr 03

A vulnerability classified as problematic was found in ThingsBoard up to 3.6.2. Rated medium severity (CVSS 6.5), this v

CVE-2024-9358 MEDIUM POC
6.0 Oct 01

A vulnerability has been found in ThingsBoard up to 3.7.0 and classified as problematic. Rated medium severity (CVSS 6.0

CVE-2022-40004 CRITICAL
9.6 Dec 15

Cross Site Scripting (XSS) vulnerability in Things Board 3.4.1 allows remote attackers to escalate privilege via crafted

CVE-2022-31861 MEDIUM POC
5.4 Sep 13

Cross site Scripting (XSS) in ThingsBoard IoT Platform through 3.3.4.1 via a crafted value being sent to the audit logs.

CVE-2022-45608 HIGH
8.8 Mar 01

An issue was discovered in ThingsBoard 3.4.1, allows low privileged attackers (CUSTOMER_USER) to gain escalated privileg

CVE-2026-53676 HIGH
8.6 Jun 17

Sandbox escape via prototype pollution in ThingsBoard (versions prior to v4.3.1.2) allows a TENANT_ADMIN-authenticated u

CVE-2023-26462 HIGH
8.1 Feb 23

ThingsBoard 3.4.1 could allow a remote attacker to gain elevated privileges because hard-coded service credentials (usab

CVE-2026-9568 LOW
2.3 May 26

Code injection in ThingsBoard 4.3.1.0 and 4.3.1.1 allows remote attackers to embed control characters and shell metachar

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy