CVE-2021-30458: Wikimedia Parsoid vulnerable to Cross-site Scripting (XSS)
6.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.44138%
CWE
Published
5/24/2022
Updated
6/7/2024
KEV Status
No
Technology
PHP
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 |
|---|---|---|---|
| wikimedia/parsoid | composer | >= 0.12, < 0.12.2 | 0.12.2 |
| wikimedia/parsoid | composer | < 0.11.1 | 0.11.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how Parsoid's WTUtils.php handled HTML comments containing JSON data. The functions reinsertFosterableContent and decodeComment failed to distinguish between legitimate internal comments and user-controlled comments containing specially crafted JSON with '@type' keys. This allowed attackers to inject <meta> tags post-sanitization. The Phabricator ticket T279451 explicitly discusses these functions' roles in comment processing and the security patch's focus on modifying key validation (changing '@type' to a protected '-type' key). The high confidence comes from direct references to these functions in the vulnerability discussion and patch details.