CVE-2023-31147
JSON

5.9medium

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

Severity
5.9medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.91% (higher than 60% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

Description

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.

Affected

Product or packageVersionsReported by
c-ares c-ares< 1.19.1CVE List
c-ares_project c-aresbefore 1.19.1NVD
fedoraproject fedora37, 38NVD

All scores

GitHub_M5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Classification

CWE-330

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-31147 changed 2025-02-13CVE Terms of Use
NVDCVE-2023-31147 changed 2026-06-17Public domain