Skip to main content
No exploitation reportedFix available

CVE-2023-31147

No exploitation reported by the sources we read.

  • Published2023-05-25
  • WeaknessCWE-330

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2023-05-2522:15CVE publishedNVD

Versions per branch

NVD
Fedoraproject fedora
BranchAffectedFixed in
37.x= 37no fix published
38.x= 38no fix published
C-ares project c-ares
BranchAffectedFixed in
1.19< 1.19.11.19.1

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • c-ares
    Affected
    • = < 1.19.1no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2023-10-08

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • c-aresWolfiall versions · fixed in 1.19.1-r0
  • c-aresTuxCare:AlmaLinux:9.2all versions · fixed in 1.17.1-5.el9_2.1.tuxcare.els3and 1 other package
  • c-aresSUSE:Manager Server 4.2all versions · fixed in 1.19.1-150000.3.23.1
  • c-aresSUSE:Manager Proxy 4.2all versions · fixed in 1.19.1-150000.3.23.1
  • c-aresSUSE:Linux Enterprise Server for SAP Applications 15 SP3all versions · fixed in 1.19.1-150000.3.23.1
  • c-aresSUSE:Linux Enterprise Server for SAP Applications 15 SP2all versions · fixed in 1.19.1-150000.3.23.1
  • c-aresSUSE:Linux Enterprise Server for SAP Applications 15 SP1all versions · fixed in 1.19.1-150000.3.23.1
  • c-aresSUSE:Linux Enterprise Server 15 SP3-LTSSall versions · fixed in 1.19.1-150000.3.23.1

115 more package ranges on OSV.dev

Vendor advisories

  • CVE-2023-31147 Red Hat Product Security245 products fixed · 8 known affected

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

    c-ares-devel as a component of Red Hat Enterprise Linux 6 · c-ares.src as a component of Red Hat Enterprise Linux 6 · c-ares as a component of Red Hat Enterprise Linux 7 · +5 more

  • RHSA-2023:6635 Red Hat Product Security31 products fixed

    Red Hat Security Advisory: c-ares security, bug fix, and enhancement update

  • RHSA-2023:4035 Red Hat Product Security31 products fixed

    Red Hat Security Advisory: nodejs:18 security update

  • RHSA-2023:4034 Red Hat Product Security30 products fixed

    Red Hat Security Advisory: nodejs:16 security update

  • RHSA-2023:4033 Red Hat Product Security30 products fixed

    Red Hat Security Advisory: nodejs:16 security update

  • RHSA-2023:4039 Red Hat Product Security24 products fixed

    Red Hat Security Advisory: rh-nodejs14-nodejs security update

3 more advisories

Full record on NVD

Fix

  1. Vendor fix Red Hat Product Security RHSA-2023:6635 · 31 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
  2. No fix available, says the vendor Red Hat Product Security CVE-2023-31147 · 3 productsAffected
  3. No fix planned, says the vendor Red Hat Product Security CVE-2023-31147 · 5 productsOut of support scope

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionnone2025-01-16
  • CNACVSS 3.15.9known since 2026-10-23
  • NVDCVSS 3.16.5read 2026-10-23
  • CNAweakness (CWE)CWE-330known since 2026-10-23
  • NVDweakness (CWE)CWE-330read 2026-10-23
  • FIRST EPSSEPSS score0.9 %2026-11-18
  • OSVaffected packages—

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Published
2023-05-25
Last Modified
2026-06-17
NVD status
Modified

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.

Is CVE-2023-31147 actively exploited?

Active exploitation of CVE-2023-31147 has not been confirmed. Its EPSS score was 0.9% on 2026-11-18, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2023-31147?

CVE-2023-31147 has a CVSS v3 base score of 6.5 (MEDIUM severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N.

Running c-ares? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record