CVE-2017-1000381
High · 7.5CVSS
7.5
EPSS
3.3%
Published
Jul 7, 2017
CISA due date
—
Cloudanix analysis
A flaw in how some Node.js programs read certain DNS answers could let attackers peek at pieces of information stored in the program's memory.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- Information Disclosure
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The ares_parse_naptr_reply function in c-ares performs an out-of-bounds memory read when parsing a specially crafted NAPTR DNS response packet, exposing adjacent heap memory contents.
Why it matters to the business
Attackers may obtain fragments of sensitive data such as cryptographic material, configuration strings, or user information from the process memory of affected Node.js applications.
How an attack unfolds
An attacker controlling a DNS server or positioned to inject responses sends a malformed NAPTR record that triggers the vulnerable parser path, causing the library to read beyond the supplied buffer and return the leaked bytes to the calling application.
How to fix it
Upgrade the Node.js installation to a build that includes commit 03a2f0c462aedcf4aaaa077c6b79791faa36bce0 or later; rebuild any statically linked c-ares libraries and restart services.
How to confirm the fix worked
Confirm the running Node.js binary links against a c-ares library containing commit 03a2f0c or verify the source tree contains the referenced commit; re-test with a fuzzed NAPTR packet to ensure no out-of-bounds access occurs.
Typical attack path
- Identify a Node.js application that performs DNS resolution using the vulnerable c-ares build.
- Craft and serve a malicious NAPTR DNS response containing an oversized or malformed record.
- Trigger the resolution operation so the crafted packet reaches ares_parse_naptr_reply.
- Capture the excess memory bytes returned in the parsed reply structure.
How to detect it
Search DNS resolver logs and application debug output for unusually large or malformed NAPTR replies; correlate with process crashes or memory dumps containing unexpected binary fragments after DNS operations.
What your security team should do
- Prioritize patching all Node.js instances that perform DNS lookups to the fixed commit.
- Review and restrict outbound DNS traffic where possible to reduce exposure surface.
- Add the fixed commit hash to dependency scanners and CI pipelines to prevent regression.
The record
The c-ares function `ares_parse_naptr_reply()`, which is used for parsing NAPTR responses, could be triggered to read memory outside of the given input buffer if the passed in DNS response packet was crafted in a particular way.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.10 | nodejs | 0 | 6.11.1-r0 |
| Alpine:v3.11 | nodejs | 0 | 6.11.1-r0 |
| Alpine:v3.12 | nodejs | 0 | 6.11.1-r0 |
| Alpine:v3.13 | nodejs | 0 | 6.11.1-r0 |
| Alpine:v3.14 | nodejs | 0 | 6.11.1-r0 |
| Alpine:v3.15 | nodejs | 0 | 6.11.1-r0 |
| Alpine:v3.16 | nodejs | 0 | 6.11.1-r0 |
| Alpine:v3.17 | nodejs | 0 | 6.11.1-r0 |
| Alpine:v3.18 | nodejs | 0 | 6.11.1-r0 |
| Alpine:v3.19 | nodejs | 0 | 6.11.1-r0 |
| Alpine:v3.20 | nodejs | 0 | 6.11.1-r0 |
| Alpine:v3.21 | nodejs | 0 | 6.11.1-r0 |
| Alpine:v3.22 | nodejs | 0 | 6.11.1-r0 |
| Alpine:v3.3 | c-ares | 0 | 1.12.0-r1 |
| Alpine:v3.4 | c-ares | 0 | 1.12.0-r1 |
| Alpine:v3.4 | nodejs | 0 | 6.7.0-r1 |
| Alpine:v3.5 | c-ares | 0 | 1.12.0-r1 |
| Alpine:v3.5 | nodejs | 0 | 6.9.5-r1 |
| Alpine:v3.6 | c-ares | 0 | 1.12.0-r1 |
| Alpine:v3.6 | nodejs | 0 | 6.10.3-r1 |
| Alpine:v3.7 | nodejs | 0 | 6.11.1-r0 |
| Alpine:v3.8 | nodejs | 0 | 6.11.1-r0 |
| Alpine:v3.9 | nodejs | 0 | 6.11.1-r0 |
| Debian:11 | c-ares | 0 | 1.12.0-4 |
| Debian:12 | c-ares | 0 | 1.12.0-4 |
| Debian:13 | c-ares | 0 | 1.12.0-4 |
| Debian:7 | c-ares | 0 | 1.9.1-3+deb7u2 |
| Mageia:5 | c-ares | 0 | 1.10.0-5.2.mga5 |
| Mageia:6 | http-parser | 0 | 2.9.2-1.mga6 |
| Mageia:6 | libuv | 0 | 1.16.1-1.mga6 |
| Mageia:6 | nodejs | 0 | 6.17.1-8.mga6 |
| Red Hat:rhel_software_collections:2::el6 | rh-nodejs6-nodejs | 0 | 0:6.11.3-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | rh-nodejs6-nodejs-debuginfo | 0 | 0:6.11.3-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | rh-nodejs6-nodejs-devel | 0 | 0:6.11.3-2.el6 |
| Red Hat:rhel_software_collections:2::el6 | rh-nodejs6-nodejs-docs | 0 | 0:6.11.3-2.el6 |
| Red Hat:rhel_software_collections:2::el7 | rh-nodejs6-nodejs | 0 | 0:6.11.3-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | rh-nodejs6-nodejs-debuginfo | 0 | 0:6.11.3-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | rh-nodejs6-nodejs-devel | 0 | 0:6.11.3-2.el7 |
| Red Hat:rhel_software_collections:2::el7 | rh-nodejs6-nodejs-docs | 0 | 0:6.11.3-2.el7 |
| SUSE:Enterprise Storage 4 | nodejs-common | 0 | 1.0-2.1 |
| SUSE:Enterprise Storage 4 | nodejs4 | 0 | 4.8.4-15.5.1 |
| SUSE:Enterprise Storage 4 | nodejs6 | 0 | 6.11.1-11.5.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | libcares2 | 0 | 1.9.1-8.1 |
| SUSE:Linux Enterprise Module for Web and Scripting 12 | nodejs-common | 0 | 1.0-2.1 |
| SUSE:Linux Enterprise Module for Web and Scripting 12 | nodejs4 | 0 | 4.8.4-15.5.1 |
| SUSE:Linux Enterprise Module for Web and Scripting 12 | nodejs6 | 0 | 6.11.1-11.5.1 |
| SUSE:Linux Enterprise Server 11 SP4-LTSS | MozillaFirefox | 0 | 68.2.0-78.51.4 |
| SUSE:Linux Enterprise Server 11 SP4-LTSS | MozillaFirefox-branding-SLED | 0 | 68-21.9.8 |
| SUSE:Linux Enterprise Server 11 SP4-LTSS | firefox-atk | 0 | 2.26.1-2.8.4 |
| SUSE:Linux Enterprise Server 11 SP4-LTSS | firefox-cairo | 0 | 1.15.10-2.13.4 |
| SUSE:Linux Enterprise Server 11 SP4-LTSS | firefox-gdk-pixbuf | 0 | 2.36.11-2.8.4 |
| SUSE:Linux Enterprise Server 11 SP4-LTSS | firefox-glib2 | 0 | 2.54.3-2.14.7 |
| SUSE:Linux Enterprise Server 11 SP4-LTSS | firefox-gtk3 | 0 | 3.10.9-2.15.3 |
| SUSE:Linux Enterprise Server 11 SP4-LTSS | firefox-harfbuzz | 0 | 1.7.5-2.7.4 |
| SUSE:Linux Enterprise Server 11 SP4-LTSS | firefox-libffi | 0 | 3.2.1.git259-2.3.3 |
| SUSE:Linux Enterprise Server 11 SP4-LTSS | firefox-libffi-gcc5 | 0 | 5.3.1+r233831-14.1 |
| SUSE:Linux Enterprise Server 11 SP4-LTSS | firefox-pango | 0 | 1.40.14-2.7.4 |
| SUSE:Linux Enterprise Server 11 SP4-LTSS | mozilla-nspr | 0 | 4.21-29.6.1 |
| SUSE:Linux Enterprise Server 11 SP4-LTSS | mozilla-nss | 0 | 3.45-38.9.3 |
| SUSE:Linux Enterprise Server 12 SP2 | libcares2 | 0 | 1.9.1-8.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | libcares2 | 0 | 1.9.1-8.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | libcares2 | 0 | 1.9.1-8.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | libcares2 | 0 | 1.9.1-8.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP2 | libcares2 | 0 | 1.9.1-8.1 |
| SUSE:OpenStack Cloud 7 | nodejs-common | 0 | 1.0-2.1 |
| SUSE:OpenStack Cloud 7 | nodejs6 | 0 | 6.11.1-11.5.1 |
| Ubuntu:14.04:LTS | c-ares | 0 | 1.10.0-2ubuntu0.2 |
| Ubuntu:16.04:LTS | c-ares | 0 | 1.10.0-3ubuntu0.2 |
| Ubuntu:Pro:14.04:LTS | nodejs | 0 | 0.10.25~dfsg2-2ubuntu1.2+esm1 |
| Ubuntu:Pro:16.04:LTS | nodejs | 0 | 4.2.6~dfsg-1ubuntu4.2+esm1 |
| Ubuntu:Pro:18.04:LTS | nodejs | 0 | 8.10.0~dfsg-2ubuntu0.4+esm1 |
| openSUSE:Tumbleweed | c-ares | 0 | 1.17.2-2.2 |
Related vulnerabilities
- CVE-2023-39333 Maliciously crafted export names in an imported WebAssembly module can inject JavaScript… Also affects nodejs
- CVE-2024-27982 The team has identified a critical vulnerability in the http server of the most recent… Also affects nodejs
- CVE-2024-27983 An attacker can make the Node.js HTTP/2 server completely unavailable by sending a small… Also affects nodejs
- CVE-2022-3786 A buffer overrun can be triggered in X.509 certificate verification, specifically in name… Also affects nodejs
- CVE-2022-3602 A buffer overrun can be triggered in X.509 certificate verification, specifically in name… Also affects nodejs
- CVE-2022-31151 Authorization headers are cleared on cross-origin redirect. Also affects nodejs
- CVE-2024-37372 The Permission Model assumes that any path starting with two backslashes \ has a… Also affects nodejs
- CVE-2024-36137 A vulnerability has been identified in Node.js, affecting users of the experimental… Also affects nodejs