Security Resilience

CVE-2024-25629

Memory Safety in C-Ares ≤ 1.27.0

Published
23 February 2024
Modified
17 June 2026
Patch / advisory
CVSS Score v3.1 4.4
Click a component to see what it means
Raw vectorCVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H
EPSS Score 0.0035 29th percentile
Risk Priority 35 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2024-25629 is a medium-severity Buffer Under-read (CWE-127) vulnerability in C-Ares. Its CVSS base score is 4.4 (Medium).

Operationally, exploitation aligns with the MITRE ATT&CK technique Application or System Exploitation (T1499.004); ranked at the 29th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to RA-5 (Vulnerability Monitoring and Scanning) and SA-11 (Developer Testing and Evaluation) — see the control section below for these in your framework.

EU & UK References

Vulnerability Data

c-ares is a C library for asynchronous DNS requests. `ares__read_line()` is used to parse local configuration files such as `/etc/resolv.conf`, `/etc/nsswitch.conf`, the `HOSTALIASES` file, and if using a c-ares version prior to 1.27.0, the `/etc/hosts` file. If any of these…

more

configuration files has an embedded `NULL` character as the first character in a new line, it can lead to attempting to read memory prior to the start of the given buffer which may result in a crash. This issue is fixed in c-ares 1.27.0. No known workarounds exist.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1212 Exploitation for Credential Access Credential Access
Adversaries may exploit software vulnerabilities in an attempt to collect credentials.
T1499 Endpoint Denial of Service Impact
Adversaries may perform Endpoint Denial of Service (DoS) attacks to degrade or block the availability of services to users.
T1499.004 Application or System Exploitation Impact
Adversaries may exploit software vulnerabilities that can cause an application or system to crash and deny availability to users.
T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1185 Browser Session Hijacking Collection
Adversaries may take advantage of security vulnerabilities and inherent functionality in browser software to change content, modify user-behaviors, and intercept information as part of various browser session hijacking techniques.
T1189 Drive-by Compromise Initial Access
Adversaries may gain access to a system through a user visiting a website over the normal course of browsing.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2024-2626Shared CWE-125
CVE-2023-22338Shared CWE-125
CVE-2024-25569Shared CWE-125
CVE-2024-32460Shared CWE-125
CVE-2024-32041Shared CWE-125
CVE-2024-32459Shared CWE-125
CVE-2023-4135Shared CWE-125
CVE-2023-1532Shared CWE-125
CVE-2024-5159Shared CWE-125
CVE-2023-39197Shared CWE-125

Affected Assets

c-ares
c-ares
≤ 1.27.0
fedoraproject
fedora
38, 39, 40

Mitigating Controls

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

Vulnerability scanning can locate known buffer-under-read instances in deployed code.

Developer testing and evaluation (static analysis, fuzzing, bounds checkers) directly finds buffer under-read flaws before deployment.

Security engineering principles require bounds-checked memory accesses and safe pointer arithmetic that structurally stop buffer under-reads from being introduced.

Process isolation confines the effects of an out-of-bounds read to the compromised process.

Input validation rejects malformed indices or lengths that would otherwise cause reads outside buffer bounds.

Mitigating Controls (NIST CSF 2.0)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.PS-06 mostly match
blocks

Secure-development practices such as bounds checking and static analysis directly prevent introduction of buffer under-reads.

ID.RA-01 partial match
blocks

Vulnerability scanning can discover buffer under-read flaws so they can be recorded and fixed.

PR.PS-02 partial match
blocks

Patching or replacing vulnerable software removes known instances of buffer under-read.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing can detect buffer under-reads before release.

prevents

A.6.3's education and training of technical teams can raise developer awareness of memory-safety practices (bounds checking, length validation) and reduce some out-of-bounds read introductions, but training is fallible and the strongest controls for this implementation-phase defect are secure coding (A.8.28) and security testing (A.8.29), so the effect is a minority one.

prevents

Secure coding standards directly require bounds checking and safe pointer arithmetic.

prevents

A.8.30 carries its effect through the secure-development practices (8.25–8.29) its contract requires of the supplier, so a faithfully implemented clause reduces ordinary software implementation weaknesses like buffer under-reads in delivered code, but the effect is bounded by the fallibility of those practices and the clause's ceiling on this verb.

finds

A.8.8's reach is disclosure-based: it finds vulnerabilities that surface as published advisories in third-party components. Buffer under-reads do occasionally appear as CVEs (e.g., CVE-2021-40985), so the disclosed minority is found, but the bulk of CWE-127 instances live in first-party code and are discovered by static analysis or code review, which A.8.8 does not perform.

References