CVE-2023-31147

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

MEDIUM
6.5
CVSS Score
Published: May 25, 2023 at 09:55 PM UTC
Updated: June 17, 2026 at 05:56 AM UTC
3 products affected across 3 vendorsFedoraC AresAres C Ares

Using c-ares by c-ares?

Get instant alerts when new vulnerabilities affect c-ares - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.5
Exploit prediction
EPSS 0.9%
SSVC
No known exploit

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 1.19.1
Affected range stops below 1.19.1, so it looks safe — our inference, not a vendor statement
v < 1.19.1
Affected range stops below 1.19.1, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-330

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card