Cloudanix VulnDB

CVE-2016-5180

Critical · 9.8

CVSS

9.8

EPSS

8.6%

Published

Oct 3, 2016

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in a common networking library lets attackers crash programs or take them over by sending specially formatted web addresses, so organizations should update the library right away to stay protected.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Remote Code Execution
Component
Library
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Heap-based buffer overflow in ares_create_query allows out-of-bounds write when processing a hostname containing an escaped trailing dot, enabling denial of service or arbitrary code execution.

Why it matters to the business

Applications relying on vulnerable c-ares versions face risk of remote compromise or service outages; the issue has remained publicly known for years with modest but persistent exploitability signals.

How an attack unfolds

An attacker supplies a crafted hostname containing an escaped trailing dot to any code path that invokes ares_create_query, triggering the overflow during DNS query construction and potentially gaining code execution or crashing the process.

How to fix it

Upgrade c-ares to version 1.12.0 or later; for Node.js, apply the fix present in commit 262dd62a9248d7021966a9d00cd6632ea1f087bc and rebuild or redeploy affected packages.

How to confirm the fix worked

Verify the installed c-ares or Node.js version against the fixed commit, and test resolution of hostnames containing escaped trailing dots to confirm absence of the overflow condition.

Typical attack path

  1. Identify a network-reachable service that uses c-ares for DNS resolution
  2. Craft a hostname string containing an escaped trailing dot
  3. Trigger DNS resolution of the malicious hostname through the vulnerable application
  4. Exploit the resulting out-of-bounds write for code execution or denial of service

How to detect it

Review application and system logs for crashes or segmentation faults during DNS resolution, inspect network traffic for unusual hostnames with escaped dots, and correlate with process dumps showing buffer overflow symptoms.

What your security team should do

  • Immediately update all instances of c-ares and dependent Node.js packages to the fixed versions
  • Scan dependency manifests for any remaining references to c-ares before 1.12.0
  • Monitor for application crashes or unexpected DNS resolution failures that could indicate attempted exploitation

The record

Heap-based buffer overflow in the ares_create_query function in c-ares 1.x before 1.12.0 allows remote attackers to cause a denial of service (out-of-bounds write) or possibly execute arbitrary code via a hostname with an escaped trailing dot.

Affected packages

Ecosystem Package Introduced Fixed
Alpine:v3.2 c-ares 0 1.12.0-r0
Alpine:v3.3 c-ares 0 1.12.0-r0
Alpine:v3.4 c-ares 0 1.12.0-r0
Alpine:v3.5 c-ares 0 1.12.0-r0
Alpine:v3.6 c-ares 0 1.12.0-r0
Alpine:v3.6 nodejs 0 6.8.0-r0
Debian:10 c-ares 0 1.12.0-1
Debian:11 c-ares 0 1.12.0-1
Debian:12 c-ares 0 1.12.0-1
Debian:13 c-ares 0 1.12.0-1
Debian:7 c-ares 0 1.9.1-3+deb7u1
Debian:8 c-ares 0 1.10.0-2+deb8u1
Mageia:5 c-ares 0 1.10.0-5.1.mga5
Red Hat:rhel_software_collections:2::el6 rh-nodejs4-http-parser 0 0:2.7.0-2.el6
Red Hat:rhel_software_collections:2::el6 rh-nodejs4-http-parser-debuginfo 0 0:2.7.0-2.el6
Red Hat:rhel_software_collections:2::el6 rh-nodejs4-http-parser-devel 0 0:2.7.0-2.el6
Red Hat:rhel_software_collections:2::el6 rh-nodejs4-nodejs 0 0:4.6.2-4.el6
Red Hat:rhel_software_collections:2::el6 rh-nodejs4-nodejs-debuginfo 0 0:4.6.2-4.el6
Red Hat:rhel_software_collections:2::el6 rh-nodejs4-nodejs-devel 0 0:4.6.2-4.el6
Red Hat:rhel_software_collections:2::el6 rh-nodejs4-nodejs-docs 0 0:4.6.2-4.el6
Red Hat:rhel_software_collections:2::el7 rh-nodejs4-http-parser 0 0:2.7.0-2.el7
Red Hat:rhel_software_collections:2::el7 rh-nodejs4-http-parser-debuginfo 0 0:2.7.0-2.el7
Red Hat:rhel_software_collections:2::el7 rh-nodejs4-http-parser-devel 0 0:2.7.0-2.el7
Red Hat:rhel_software_collections:2::el7 rh-nodejs4-nodejs 0 0:4.6.2-4.el7
Red Hat:rhel_software_collections:2::el7 rh-nodejs4-nodejs-debuginfo 0 0:4.6.2-4.el7
Red Hat:rhel_software_collections:2::el7 rh-nodejs4-nodejs-devel 0 0:4.6.2-4.el7
Red Hat:rhel_software_collections:2::el7 rh-nodejs4-nodejs-docs 0 0:4.6.2-4.el7
SUSE:Linux Enterprise Desktop 12 SP1 libcares2 0 1.9.1-5.1
SUSE:Linux Enterprise Desktop 12 SP2 libcares2 0 1.9.1-5.1
SUSE:Linux Enterprise Module for Web and Scripting 12 nodejs4 0 4.6.1-11.1
SUSE:Linux Enterprise Server 11 SP4 libcares2 0 1.7.4-7.9.1
SUSE:Linux Enterprise Server 12 SP1 libcares2 0 1.9.1-5.1
SUSE:Linux Enterprise Server 12 SP2 libcares2 0 1.9.1-5.1
SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 libcares2 0 1.9.1-5.1
SUSE:Linux Enterprise Server for SAP Applications 11 SP4 libcares2 0 1.7.4-7.9.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP1 libcares2 0 1.9.1-5.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP2 libcares2 0 1.9.1-5.1
SUSE:Linux Enterprise Software Development Kit 11 SP4 libcares2 0 1.7.4-7.9.1
SUSE:Linux Enterprise Software Development Kit 12 SP1 libcares2 0 1.9.1-5.1
SUSE:Linux Enterprise Software Development Kit 12 SP2 libcares2 0 1.9.1-5.1
SUSE:Linux Enterprise Workstation Extension 12 SP1 libcares2 0 1.9.1-5.1
SUSE:Linux Enterprise Workstation Extension 12 SP2 libcares2 0 1.9.1-5.1
Ubuntu:14.04:LTS c-ares 0 1.10.0-2ubuntu0.1
Ubuntu:16.04:LTS c-ares 0 1.10.0-3ubuntu0.1
openSUSE:Tumbleweed c-ares 0 1.12.0-1.1

Related vulnerabilities