Security Resilience

CVE-2023-31147

Crypto Weakness in C-Ares Project C-Ares ≤ 1.19.1

Published
25 May 2023
Modified
21 November 2024
CVSS Score v3.1 5.9
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS Score 0.0091 61th percentile
Risk Priority 48 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2023-31147 is a medium-severity Use of Insufficiently Random Values (CWE-330) vulnerability in C-Ares Project C-Ares. Its CVSS base score is 5.9 (Medium).

Operationally, ranked in the top 39% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

CVEs Like This One

CVE-2023-31124Same product: C-Ares Project C-Ares
CVE-2023-31130Same product: C-Ares Project C-Ares
CVE-2023-32067Same product: C-Ares Project C-Ares
CVE-2019-5420Shared CWE-330
CVE-2024-38273Related weakness
CVE-2024-0813Related weakness
CVE-2024-32662Related weakness
CVE-2023-25193Related weakness
CVE-2023-22840Related weakness
CVE-2024-31142Related weakness

Affected Assets

c-ares project
c-ares
≤ 1.19.1
fedoraproject
fedora
37, 38

Mitigating Controls

Likely Mitigating Controls

Our mappings. Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-330

Key generation under controlled management uses approved random-bit sources rather than insufficiently random values.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

blocks

Cryptographic controls require use of approved, sufficiently random values for keys and nonces.

finds

Security testing can detect weak randomness but does not prescribe the control itself.

prevents

Secure coding standards explicitly prohibit use of weak or predictable random number generators.

Hardening callouts derived

DISA STIG baselines are authored against specific weaknesses. Where this CVE cites a broad weakness class, the mapping is not asserted at that abstraction (owner ruling, 2026-09-25: grade only at Base and below), so no rule is shown here rather than a rule shown against the wrong grain.

References