{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2023-31147","id":"CVE-2023-31147","title":"Insufficient randomness in generation of DNS query IDs in c-ares","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 implem","descriptionLong":"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.","published":"2023-05-25T21:55:47.585Z","updated":"2026-10-28T02:31:13.767693637Z","reserved":"2023-04-24T21:44:10.418Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"medium","source":"OSV"}],"rating":"medium","products":["c-ares"],"affectedProducts":[{"vendor":"c-ares","product":"c-ares","defaultStatus":null,"versions":[{"version":"< 1.19.1","status":"affected"}],"platforms":[]}],"packages":[],"cwes":["CWE-330"],"aliases":["GHSA-8r8p-23f3-64c2"],"references":[{"url":"https://github.com/c-ares/c-ares/security/advisories/GHSA-8r8p-23f3-64c2","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory"]},{"url":"https://github.com/c-ares/c-ares/releases/tag/cares-1_19_1","tags":["x_refsource_MISC","x_transferred","Release Notes","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B5Z5XFNXTNPTCBBVXFDNZQVLLIE6VRBY/","tags":["x_transferred","Mailing List","Third Party Advisory","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UBFWILTA33LOSV23P44FGTQQIDRJHIY7/","tags":["x_transferred","Mailing List","Third Party Advisory","web"]},{"url":"https://security.gentoo.org/glsa/202310-09","tags":["x_transferred","Third Party Advisory","advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/31xxx/CVE-2023-31147.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-31147","tags":["advisory"]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00905,"epssPercentile":0.6056,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2023-31147","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-31147","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2023-31147","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2023-31147","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}