CVE-2020-36620:
EnumStringValues vulnerable to Uncontrolled Resource Consumption
3.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.40049%
CWE
Published
12/21/2022
Updated
1/28/2023
KEV Status
No
Technology
C#
Technical Details
CVSS Vector
CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
EnumStringValues | nuget | < 4.0.2 | 4.0.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from how the cache was populated in TryParseStringValueToEnum_ViaCache. Pre-patch, it used GetOrAdd with a value factory that parsed ANY input string (valid or invalid), adding null entries for failures. Attackers could exploit this by sending unique invalid strings, causing the ConcurrentDictionary to grow indefinitely. The patch fixed this by pre-populating the cache ONLY with valid enum values via BuildCacheDictionaryForParseStringValue before any user input is processed, preventing cache pollution. While the advisory mentions GetStringValuesWithPreferences_Uncache, the actual vulnerable code path is in TryParseStringValueToEnum_ViaCache as shown in the commit diff.