Miggo Logo

CVE-2021-4248: DNS NuGet package uses insufficiently random values

9.8

CVSS Score
3.1

Basic Information

EPSS Score
0.24187%
Published
12/18/2022
Updated
1/31/2023
KEV Status
No
Technology
TechnologyC#

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
DNSnuget< 7.0.07.0.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the use of System.Random in the Request constructor to generate DNS transaction IDs. The commit cf7105a explicitly replaces this with a cryptographically secure RNGCryptoServiceProvider, indicating the constructor's ID generation was the weak point. The CWE-330 classification and advisory descriptions about insufficient PRNG entropy directly align with this code change. The affected code path is clearly shown in the diff where RANDOM.Next() was used for header.Id assignment before patching.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

* vuln*r**ility w*s *oun* in k*p*t*n *ns up to *.*.*. It **s ***n r*t** *s pro*l*m*ti*. *****t** *y t*is issu* is som* unknown *un*tion*lity o* t** *il* *NS/Proto*ol/R*qu*st.*s. T** m*nipul*tion l***s to insu**i*i*nt *ntropy in prn*. T** *tt**k m*y *

Reasoning

T** vuln*r**ility st*ms *rom t** us* o* `Syst*m.R*n*om` in t** R*qu*st *onstru*tor to **n*r*t* *NS tr*ns**tion I*s. T** *ommit ******* *xpli*itly r*pl***s t*is wit* * *rypto*r*p*i**lly s**ur* `RN**ryptoS*rvi**Provi**r`, in*i**tin* t** *onstru*tor's I