FedoraOperating system · Fedoraproject

CVE-2023-31130

MEDIUM · 6.4 CVSS v3.1 Published 2023-05-25
Fix available
A fix is available. Upgrade to 1.19.1 or later.
See remediation →
66/100
Remediation priority · Elevated
Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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 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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The ares_inet_net_pton() function in c-ares library contains a buffer underflow vulnerability when parsing certain specially crafted IPv6 addresses like '0::00:00:00/2'. This function is primarily used internally for configuring sortlist options via ares_set_sortlist() but may also be called directly by external users.

MitigationUpgrade c-ares to version 1.19.1 or later to receive the patch; if immediate upgrading is not feasible, avoid passing untrusted IPv6 network addresses to ares_inet_net_pton().

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
FedoraOperating system
Affected:= 37= 38
Debian LinuxOperating system
Affected:= 10.0= 11.0
C AresApplication
Affected:< 1.19.1

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Local
Complexity
High
Privileges
High
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify c-ares library installation
    Run 'pkg-config --modversion c-ares' or check your system's package manager for the installed c-ares version (e.g., 'rpm -q c-ares' on Fedora, 'dpkg -l libc-ares' on Debian)
    Affected if The installed version is lower than 1.19.1 (e.g., 1.19.0, 1.18.x, or earlier)
  2. Locate the c-ares library file
    Run 'ldconfig -p | grep c-ares' or search for 'libcares.so' on the system to find the shared library path and confirm c-ares is present
    Affected if c-ares library is present on the system and the version cannot be determined or is below 1.19.1
  3. Identify applications using ares_set_sortlist
    Search application source code for calls to ares_set_sortlist() function, or if using a binary, run 'objdump -T /path/to/binary | grep ares_set_sortlist' or 'nm -D /path/to/binary | grep ares_set_sortlist'
    Affected if The application calls ares_set_sortlist() and passes IPv6 addresses to it
  4. Identify direct usage of ares_inet_net_pton
    Search application source code for direct calls to ares_inet_net_pton(), or run 'objdump -T /path/to/binary | grep ares_inet_net_pton'
    Affected if The application directly calls ares_inet_net_pton() with IPv6 network addresses
  5. Review sortlist configuration
    If using ares_set_sortlist(), examine the configuration or input passed to it for any IPv6 addresses in format similar to '0::00:00:00/2' or other crafted IPv6 network addresses
    Affected if The sortlist configuration contains IPv6 addresses in the problematic format
  6. Check for external input handling IPv6 addresses
    Review how the application processes and validates IPv6 address input from external sources, particularly network addresses with prefix lengths
    Affected if Untrusted IPv6 network addresses from external sources are passed to c-ares functions without validation

The environment is affected if c-ares version is below 1.19.1 AND the application uses ares_set_sortlist() or directly calls ares_inet_net_pton() with IPv6 network addresses, especially from untrusted sources.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 1.19.1 or later
Fixed in 1.19.1
Interim mitigation

Upgrade c-ares to version 1.19.1 or later to receive the patch; if immediate upgrading is not feasible, avoid passing untrusted IPv6 network addresses to ares_inet_net_pton().

Recommended fix High confidence

c-ares version 1.19.1 or later

  1. Identify the current version of c-ares library installed in your system
  2. Upgrade c-ares to version 1.19.1 or later
  3. Verify the upgrade was successful by checking the installed c-ares version
  4. Rebuild any applications that statically link against c-ares to ensure they use the fixed version

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Fedora Scoped from the published advisory
  • Consultation1.0 h
  • Implementation2.0 h
  • Testing2.0 h
  • Review / QA1.0 h
6.0 hours of engineering $1,040
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,664.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2023-31130 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2023-31130 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data