# CVE-2024-25629: c-ares out of bounds read in ares__read_line()

- Severity: Medium 4.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.35%, higher than 30% of CVEs (2026-12-01)
- Published: 2024-02-23T14:52:24.967Z
- Modified: 2026-06-17T07:16:19.490Z
- Weaknesses: CWE-125, CWE-127
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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 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.

(As written by CVE List.)

## Affected

- c-ares c-ares: < 1.27.0; before 1.27.0
- fedoraproject fedora: 38; 39; 40

## Every score

- GitHub_M: CVSS:3.1 4.4 Medium `CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/c-ares/c-ares/security/advisories/GHSA-mg26-v6qh-x48q> (vendor-advisory)
- <https://github.com/c-ares/c-ares/commit/a804c04ddc8245fc8adf0e92368709639125e183> (patch)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GX37LFPFQ3T6FFMMFYQTEGIQXXN7F27U/> (mailing-list)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2P76QYINQNPEHUTEEDOUYIRZ2X6UVZ5K/> (mailing-list)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CSCMTSPDIE2UHU34TIXQQHZ6JTE3Y3VF/> (mailing-list)

## Sources

- CVE List: [CVE-2024-25629](https://www.cve.org/CVERecord?id=CVE-2024-25629), CVE Terms of Use, modified 2025-02-13
- NVD: [CVE-2024-25629](https://nvd.nist.gov/vuln/detail/CVE-2024-25629), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-25629 · Whole record: https://cve.day/CVE-2024-25629.json · Rebuilt by cve.day 2026-11-25T22:58:37.024Z
