Remote code execution in c-ares



Risk High
Patch available YES
Number of vulnerabilities 1
CVE-ID CVE-2025-31498
CWE-ID CWE-416
Exploitation vector Network
Public exploit N/A
Vulnerable software
c-ares
Universal components / Libraries / Libraries used by multiple products

Vendor c-ares.haxx.se

Security Bulletin

This security bulletin contains one high risk vulnerability.

1) Use-after-free

EUVDB-ID: #VU107155

Risk: High

CVSSv4.0: 4.9 [CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N/E:U/U:Amber]

CVE-ID: CVE-2025-31498

CWE-ID: CWE-416 - Use After Free

Exploit availability: No

Description

The vulnerability allows a remote attacker to compromise vulnerable system.

The vulnerability exists due to a use-after-free error within the read_answers() function. A remote attacker can send specially crafted ICMP UNREACHABLE packets to the application, trigger a use-after-free error and execute arbitrary code on the system.


Mitigation

Install updates from vendor's website.

Vulnerable software versions

c-ares: 1.32.3 - 1.34.4

CPE2.3 External links

https://github.com/c-ares/c-ares/security/advisories/GHSA-6hxc-62jh-p29v


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.



###SIDEBAR###