Security Resilience

CVE-2023-31130

Memory Safety in C-Ares Project C-Ares ≤ 1.19.1

Published
25 May 2023
Modified
13 February 2025
CVSS Score v3.1 4.1
Click a component to see what it means
Raw vectorCVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H
EPSS Score 0.0039 33th percentile
Risk Priority 33 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-2023-31130 is a medium-severity Buffer Underflow (CWE-124) vulnerability in C-Ares Project C-Ares. Its CVSS base score is 4.1 (Medium).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked at the 33th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

EU & UK References

Vulnerability Data

c-ares is an asynchronous resolver library. ares_inet_net_pton() is vulnerable to a buffer underflow for certain ipv6 addresses, in particular "0::00:00:00/2" was found to cause an issue. C-ares only uses this function internally for configuration purposes which would require an administrator…

more

to configure such an address via ares_set_sortlist(). However, users may externally use ares_inet_net_pton() for other purposes and thus be vulnerable to more severe issues. This issue has been fixed in 1.19.1.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
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.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1210 Exploitation of Remote Services Lateral Movement
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network.
T1212 Exploitation for Credential Access Credential Access
Adversaries may exploit software vulnerabilities in an attempt to collect credentials.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2023-2133Shared CWE-787
CVE-2023-1810Shared CWE-787
CVE-2023-40567Shared CWE-787
CVE-2023-4353Shared CWE-787
CVE-2023-39352Shared CWE-787
CVE-2023-4355Shared CWE-787
CVE-2023-43641Shared CWE-787
CVE-2021-21148Shared CWE-787
CVE-2023-1812Shared CWE-787
CVE-2023-2137Shared CWE-787

Affected Assets

c-ares project
c-ares
≤ 1.19.1
fedoraproject
fedora
37, 38
debian
debian linux
10.0, 11.0

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)

—

Validate
Prove the fix (OWASP ASVS)
  • V1.4.1

Likely Mitigating Controls

Our mappings. Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-787

Out-of-bounds writes that corrupt control flow or inject shellcode are rendered non-executable by the same memory protections.

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 SDLC practices directly prevent introduction of buffer underwrite flaws via coding standards, reviews, and testing.

ID.RA-01 partial match
blocks

Vulnerability identification processes can discover buffer underwrite issues but do not prevent their creation.

PR.PS-02 partial match
blocks

Patching removes instances of the weakness after discovery but does not address root-cause prevention in code.

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 in development catches buffer-underflow defects before release.

prevents

Training on secure coding practices (the technical-team portion of A.6.3) reduces some buffer-underwrite instances by raising developer awareness of bounds-checking and pointer arithmetic, but developers remain fallible and the clause mandates a practice rather than a mechanism, so only a minority of instances are prevented — consistent with the A.6.3 -> CWE-598 anchor at `partial`.

prevents

Secure coding standards explicitly forbid unsafe pointer arithmetic and mandate bounds checks.

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 implementation-phase memory-safety defects like buffer underwrite the way those practices do; the owner has ruled this clause's ceiling on `prevents` at `partial` for regular software CWEs, and CWE-124 is one.

finds

A.8.8's reach is disclosure-based (vulnerability scanning, published advisories, patch management), and CWE-124 does surface as CVEs (multiple observed examples listed), so the disclosed share is reachable; but the bulk of buffer underwrite instances live in custom code or unpublished third-party components, capping the rung at `partial` per the disclosure-reach doctrine.

References