CVE-2022-0159: orchardcore is vulnerable to Cross-site Scripting
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.44009%
CWE
Published
1/21/2022
Updated
2/3/2023
KEV Status
No
Technology
C#
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
OrchardCore | nuget | < 1.2.1 | 1.2.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from improper output encoding in Razor views. Key issues included:
- Directly rendering user-controlled values (e.g.,
item.Text
,typeDisplayName
) without encoding viaHtml.Encode()
orHtml.Raw()
. - The patches consistently addressed these by either removing
Html.Raw()
(relying on Razor's default encoding) or explicitly addingHtml.Encode()
. High-confidence examples include views likeManage.cshtml
andCreate.cshtml
, where unencoded rendering of dynamic data was corrected. Controller changes (e.g.,DashboardController
) also contributed by simplifying data flow, but the primary XSS vectors were in view rendering.