CVE-2023-31147 Insufficient randomness in generation of DNS query IDs in c-ares
Attackers can predict DNS query IDs due to weak randomness, enabling cache poisoning or spoofing attacks against applications using c-ares.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-31147?
CVE-2023-31147 is a medium-severity vulnerability in Fedoraproject Fedora, published on 25 May 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-330
Which versions are affected by CVE-2023-31147?
It affects 2 products.
Products include C-Ares Project C-Ares, Fedoraproject Fedora.
How do I fix CVE-2023-31147?
Upgrade to a fixed version.
Is CVE-2023-31147 being exploited?
There is no known exploitation of CVE-2023-31147 in the wild and no public exploit code.
Other vulnerabilities in Fedoraproject Fedora
Sources
Also known as AZL-26869, AZL-26870, AZL-26871, AZL-26874, AZL-26875, AZL-26876 and 7 more.