ThingsBoard
CVE-2025-34281
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as low-privileged user
-
DeliveryUpload malicious SVG to Image Gallery
-
ExploitEmbed image in dashboard/widget or share public API link
-
ExecutionVictim's browser loads SVG and runs JavaScript
-
ImpactHijack 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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
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
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.
Primary rating from Vendor (596c5446-0ce5-4ba2-aa66-48b3b757a647).
CVSS VectorVendor: 596c5446-0ce5-4ba2-aa66-48b3b757a647
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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
More in Thingsboard
View allThingsBoard before 3.5 allows Server-Side Template Injection if users are allowed to modify an email template, because A
ThingsBoard before v3.2 is vulnerable to Host header injection in password-reset emails. Rated high severity (CVSS 8.8),
SVG-based server-side request forgery in ThingsBoard versions prior to 4.2.1 allows upload of crafted SVG files containi
An arbitrary file upload vulnerability in the Image Gallery of ThingsBoard Community, ThingsBoard Cloud and ThingsBoard
A vulnerability classified as problematic was found in ThingsBoard up to 3.6.2. Rated medium severity (CVSS 6.5), this v
A vulnerability has been found in ThingsBoard up to 3.7.0 and classified as problematic. Rated medium severity (CVSS 6.0
Cross Site Scripting (XSS) vulnerability in Things Board 3.4.1 allows remote attackers to escalate privilege via crafted
Cross site Scripting (XSS) in ThingsBoard IoT Platform through 3.3.4.1 via a crafted value being sent to the audit logs.
An issue was discovered in ThingsBoard 3.4.1, allows low privileged attackers (CUSTOMER_USER) to gain escalated privileg
Sandbox escape via prototype pollution in ThingsBoard (versions prior to v4.3.1.2) allows a TENANT_ADMIN-authenticated u
ThingsBoard 3.4.1 could allow a remote attacker to gain elevated privileges because hard-coded service credentials (usab
Code injection in ThingsBoard 4.3.1.0 and 4.3.1.1 allows remote attackers to embed control characters and shell metachar
NVD
CVE.org
EPSS
GitHub
Exploit-DB