6.5

CVE-2023-31147: Insufficient randomness in generation of DNS query IDs in c-ares

Modified
AliasesDEBIAN-CVE-2023-31147CGA-p3mv-2xf6-q3xhCGA-wp9p-9r34-j2m6
Published 25-05-2023Last modified 13-02-2025

Vulnerability summary

CVE-2023-31147 is a medium (CVSS 6.5) Use of Insufficiently Random Values vulnerability in c-ares_project c-ares. EPSS estimates a 0.90% chance of exploitation in the next 30 days, higher than 59.6% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 5.9, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
6.5/10
010
Medium · v3.1 (NVD)
EPSS score
0.90%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 16 · Related 10

Timeline

  1. 25-05-2023
    PublishedVulnerability first disclosed.
  2. 13-02-2025
    Last modifiedVulnerability information updated.

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.

CVSS metrics

5 scores · 5 sources · 1 version

EPSS trend

Probability

0.90%

Chance of exploitation in the next 30 days

Percentile

60%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.90% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

C-ares1 product
C-ares_project1 product
Chainguard1 product
  • c-ares< 1.19.1-r0
Debian1 product
  • c-aresAll versions (No fix recorded) | < 1.19.1-2
Fedoraproject1 product
Wolfi1 product
  • c-ares< 1.19.1-r0

6 vendors · 6 products

References

8 links