CVE-2017-20158: Yii2 FileAPI Widget vulnerable to Cross-site Scripting
6.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.2972%
CWE
Published
12/31/2022
Updated
12/29/2023
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 |
|---|---|---|---|
| vova07/yii2-fileapi-widget | composer | < 0.1.9 | 0.1.9 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the unescaped error message output in the run() method. The commit diff shows the fix adds Html::encode() to sanitize the error message. Since this method handles user-controlled file upload errors and directly returns the unescaped value in JSON responses, it creates an XSS vector when the error message is rendered in the browser. The patch confirmation and CWE-79 classification confirm this is an XSS vulnerability caused by improper output encoding in this function.