CVE-2023-31147CWE-330

Insufficient randomness in generation of DNS query IDs in c-ares

Medium · published May 25, 2023

CVSS v3.1
5.9
EPSS
1%
Percentile
59.2
In the wild
Unconfirmed
What it is

c-ares is an asynchronous resolver library. When /dev/urandom or RtlGenRandom() are unavailable, c-ares uses rand() to generate random numbers used for DNS query ids. This is not a CSPRNG, and it is also not seeded by srand() so will generate predictable output. Input from the random number generator is fed into a non-compilant RC4 implementation and may not be as strong as the original RC4 implementation. No attempt is made to look for modern OS-provided CSPRNGs like arc4random() that is widely available. This issue has been fixed in version 1.19.1.

The record
Technical detail
CVSS v3.1
5.9 · MEDIUM
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.00897 · 59.2th percentile
Weakness
CWE-330 · Use of Insufficiently Random Values
Published
2023-05-25T21:55Z
EPSS history
Timeline
  • 25 MAY 21:55Z
    Insufficient randomness in generation of DNS query IDs in c-ares
    cvelistv5