CVE-2023-31147
CVE-2023-31147 is a medium-severity vulnerability in C-ares Project C-ares with a CVSS 3.x base score of 5.9. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-330.
Key facts
- Severity: Medium (CVSS 3.x base score 5.9)
- EPSS exploit prediction: 1% (56th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-330
- Affected product: C-ares Project C-ares
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2023-31147?
- 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.
- How severe is CVE-2023-31147?
- CVE-2023-31147 has a CVSS 3.x base score of 5.9, rated medium severity. It is exploitable over network with high attack complexity, requires no privileges and no user interaction. Impact on confidentiality is none, integrity high, and availability none.
- Is CVE-2023-31147 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (56th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2023-31147?
- CVE-2023-31147 primarily affects C-ares Project C-ares. In total, 3 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2023-31147?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2023-31147 published?
- CVE-2023-31147 was published on 2023-05-25 and last updated on 2026-06-17.
References
- https://github.com/c-ares/c-ares/releases/tag/cares-1_19_1
- https://github.com/c-ares/c-ares/security/advisories/GHSA-8r8p-23f3-64c2
- https://lists.fedoraproject.org/archives/list/[email protected]/message/B5Z5XFNXTNPTCBBVXFDNZQVLLIE6VRBY/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/UBFWILTA33LOSV23P44FGTQQIDRJHIY7/
- https://security.gentoo.org/glsa/202310-09
Affected products (3)
- cpe:2.3:a:c-ares_project:c-ares:*:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*
More vulnerabilities in C-ares Project C-ares
- CVE-2016-5180 — Critical (CVSS 9.8): Heap-based buffer overflow in the ares_create_query function in c-ares 1.x before 1.12.0 allows remote attackers to…
- CVE-2022-4904 — High (CVSS 8.6): A flaw was found in the c-ares package. The ares_set_sortlist is missing checks about the validity of the input string,…
- CVE-2023-32067 — High (CVSS 7.5): c-ares is an asynchronous resolver library. c-ares is vulnerable to denial of service. If a target resolver sends a…
- CVE-2020-8277 — High (CVSS 7.5): A Node.js application that allows an attacker to trigger a DNS request for a host of their choice could trigger a…
- CVE-2017-1000381 — High (CVSS 7.5): The c-ares function `ares_parse_naptr_reply()`, which is used for parsing NAPTR responses, could be triggered to read…
- CVE-2021-3672 — Medium (CVSS 5.6): A flaw was found in c-ares library, where a missing input validation check of host names returned by DNS (Domain Name…
All CVEs affecting C-ares Project C-ares →
Other CWE-330 (Use of Insufficiently Random Values) vulnerabilities
- CVE-2023-22601 — Critical (CVSS 10.0): InHand Networks InRouter 302, prior to version IR302 V3.5.56, and InRouter 615, prior to version…
- CVE-2026-25072 — Critical (CVSS 9.8): XikeStor SKS8310-8X Network Switch firmware versions 1.04.B07 and prior contain a predictable session identifier…
- CVE-2026-27755 — Critical (CVSS 9.8): SODOLA SL902-SWTGW124AS firmware versions through 200.1.20 contain a weak session identifier generation vulnerability…
- CVE-2026-27637 — Critical (CVSS 9.8): FreeScout is a free help desk and shared inbox built with PHP's Laravel framework. Prior to version 1.8.206,…
- CVE-2025-64097 — Critical (CVSS 9.8): NervesHub is a web service that allows users to manage over-the-air (OTA) firmware updates of devices in the field. A…
- CVE-2025-4607 — Critical (CVSS 9.8): The PSW Front-end Login & Registration plugin for WordPress is vulnerable to Privilege Escalation in all versions up…
Browse all CWE-330 (Use of Insufficiently Random Values) vulnerabilities →