Miggo Logo

CVE-2022-25854: tagify can pass a malicious placeholder to initiate the cross-site scripting (XSS) payload

6.1

CVSS Score
3.1

Basic Information

EPSS Score
0.71126%
Published
4/30/2022
Updated
1/30/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
@yaireo/tagifynpm< 4.9.84.9.8

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper input sanitization in the placeholder handling code. The commit diff shows the fix added escapeHTML() around input.getAttribute('placeholder'). Before the patch, the code in Tagify's initialization prototype (line 104 of src/tagify.js) directly used user-controlled placeholder values from input attributes without sanitization, making it vulnerable to XSS payload injection. The vulnerability is clearly located in the initialization logic that processes input attributes, specifically the placeholder handling path.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

T*is *****ts t** p**k*** @y*ir*o/t**i*y ***or* *.*.*. T** p**k*** is us** *or r*n**rin* UI *ompon*nts insi** t** input or t*xt *i*l*s, *n* *n *tt**k*r **n p*ss * m*li*ious pl****ol**r v*lu* to it to *ir* t** *ross-sit* s*riptin* (XSS) p*ylo**.

Reasoning

T** vuln*r**ility st*ms *rom improp*r input s*nitiz*tion in t** pl****ol**r **n*lin* *o**. T** *ommit *i** s*ows t** *ix ***** `*s**p**TML()` *roun* `input.**t*ttri*ut*('pl****ol**r')`. ***or* t** p*t**, t** *o** in `T**i*y`'s initi*liz*tion prototyp