CVE-2022-25929: Smoothie vulnerable to Cross-site Scripting when tooltipLabel or strokeStyle are controlled by users
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.33174%
CWE
Published
12/21/2022
Updated
1/30/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
smoothie | npm | >= 1.31.0, < 1.36.1 | 1.36.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the tooltipFormatter function building HTML through unsafe string concatenation of user-controlled properties. The commit diff shows the original implementation used innerHTML with raw user input in strokeStyle and tooltipLabel, while the patch switched to DOM element creation methods (createElement, createTextNode) to prevent HTML injection. The function's direct handling of these user-controlled properties in HTML generation makes it the clear vulnerable entry point.