CVE-2020-36655: Command injection in yiisoft/yii2-gii
8.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.79194%
CWE
Published
1/21/2023
Updated
1/31/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| yiisoft/yii2-gii | composer | < 2.2.2 | 2.2.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper input validation in the validateMessageCategory method. The commit diff shows the fix added a regex pattern (\w+) to restrict messageCategory values, proving the original implementation lacked proper sanitization. Attackers could exploit this by supplying a crafted messageCategory containing PHP code termination characters (like ') followed by malicious code, which would then be embedded in generated model files. The validateMessageCategory() function was the primary validation gatekeeper for this input, making it the root vulnerable function.