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
CVE ID
GHSA ID
EPSS Score
0.71126%
CWE
Published
4/30/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:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
@yaireo/tagify | npm | < 4.9.8 | 4.9.8 |
Vulnerability Intelligence
Miggo AI
Root 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.