cbcvebase.
CVE-2018-7183
published 2018-03-08

CVE-2018-7183: Buffer overflow in the decodearr function in ntpq in ntp 4.2.8p6 through 4.2.8p10 allows remote attackers to execute arbitrary code by leveraging an ntpq query…

PriorityP356critical9.8CVSS 3.0
AVNACLPRNUINSUCHIHAH
EPSS
10.78%
95.3th percentile
Buffer overflow in the decodearr function in ntpq in ntp 4.2.8p6 through 4.2.8p10 allows remote attackers to execute arbitrary code by leveraging an ntpq query and sending a response with a crafted array.

Affected

19 ranges
VendorProductVersion rangeFixed in
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
debianntp< ntp 1:4.2.8p11+dfsg-1 (bullseye)ntp 1:4.2.8p11+dfsg-1 (bullseye)
debianntpsec< ntp 1:4.2.8p11+dfsg-1 (bullseye)ntp 1:4.2.8p11+dfsg-1 (bullseye)
freebsdfreebsd
freebsdfreebsd
freebsdfreebsd
ntpntp
ntpntp
ntpntp
ntpntp
ntpntp
ntpntp>= 0 < 1:4.2.8p11+dfsg-11:4.2.8p11+dfsg-1
ntpntp>= 0 < 1:4.2.6.p5+dfsg-3ubuntu2.14.04.131:4.2.6.p5+dfsg-3ubuntu2.14.04.13
ntpntp>= 0 < 1:4.2.8p4+dfsg-3ubuntu5.91:4.2.8p4+dfsg-3ubuntu5.9
ntpntp>= 0 < 1:4.2.8p10+dfsg-5ubuntu7.11:4.2.8p10+dfsg-5ubuntu7.1

Detection & IOCsextracted from sources · hover to see the quote

  • Target the decodearr() function in ntpq; the vulnerability is triggered when ntpq receives a crafted response containing a malformed array, causing a buffer overflow — monitor for anomalous NTP mode 6 (ntpq) response traffic with oversized or malformed array fields
  • Attack vector requires either a maliciously-altered ntpd returning a crafted array result, or a man-in-the-middle actor forging an ntpq response before the legitimate ntpd reply arrives — inspect NTP response packets on the wire for array payloads that exceed expected buffer bounds
  • Affected process is ntpq (the NTP query/monitoring client), not ntpd — focus endpoint detection on ntpq process crashes or unexpected code execution spawned from ntpq
  • ·Vulnerable NTP versions are 4.2.8p6 through 4.2.8p10; upgrade to 4.2.8p11 or later to remediate — Red Hat Enterprise Linux 5, 6, and 7 are listed as Not Affected, while RHEL 8 is 'Will not fix'
  • ·Debian bullseye resolved the issue in package version 1:4.2.8p11+dfsg-1; ensure patched package is deployed
  • ·The exploit requires the attacker to either control a malicious ntpd or perform a man-in-the-middle attack on ntpq query traffic — network segmentation and authenticated NTP (e.g., NTS or symmetric keys) reduce exposure

CVSS provenance

nvdv3.09.8CRITICALCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
osv9.8CRITICAL
vendor_debian9.8LOW
vendor_oracle9.8CRITICAL
vendor_redhat9.8CRITICAL
vendor_ubuntu7.5HIGH
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.