Vulnerabilities / CVE-2018-12327

critical

CVE-2018-12327

ntp: Stack-based buffer overflow in ntpq and ntpdc allows denial of service or code execution

Published Modified CWE 787
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat7.0CVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, Photon OS. Rated lower by Red Hat (low), Amazon (low), Oracle (low), Ubuntu (low).

Description

Stack-based buffer overflow in ntpq and ntpdc of NTP version 4.2.8p11 allows an attacker to achieve code execution or escalate to higher privileges via a long string as the argument for an IPv4 or IPv6 command-line parameter. NOTE: It is unclear whether there are any common situations in which ntpq or ntpdc is used with a command line from an untrusted source.

Affected packages and fixed versions

SourcePackageFixed in
Photon OS 1.0ntp4.2.8p12-1.ph1
Photon OS 2.0ntp4.2.8p12-1.ph2
amazon linux 1ntp, ntp-debuginfo, ntp-doc and 2 more4.2.8p12-1.39.amzn1
amazon linux 2ntp, ntp-debuginfo, ntp-doc and 3 more4.2.6p5-29.amzn2.0.1
debian 11ntpno fix listed
Oracle Linux 6ntp, ntp-doc, ntp-perl and 1 more4.2.6p5-15.0.1.el6_10
Oracle Linux 7ntp, ntp-doc, ntp-perl and 2 more4.2.6p5-29.0.1.el7
ubuntu 14.04-ESMntp1:4.2.6.p5+dfsg-3ubuntu2.14.04.13+esm1
ubuntu 16.04ntp1:4.2.8p4+dfsg-3ubuntu5.10
ubuntu 16.04-ESMntp1:4.2.8p4+dfsg-3ubuntu5.10
ubuntu 18.04-ESMntp1:4.2.8p10+dfsg-5ubuntu7.3+esm1
Show all 27 entries from 11 sources
SourcePackageFixed in
Photon OS 1.0ntp4.2.8p12-1.ph1
Photon OS 2.0ntp4.2.8p12-1.ph2
amazon linux 1ntp4.2.8p12-1.39.amzn1
amazon linux 1ntp-debuginfo4.2.8p12-1.39.amzn1
amazon linux 1ntp-doc4.2.8p12-1.39.amzn1
amazon linux 1ntp-perl4.2.8p12-1.39.amzn1
amazon linux 1ntpdate4.2.8p12-1.39.amzn1
amazon linux 2ntp4.2.6p5-29.amzn2.0.1
amazon linux 2ntp-debuginfo4.2.6p5-29.amzn2.0.1
amazon linux 2ntp-doc4.2.6p5-29.amzn2.0.1
amazon linux 2ntp-perl4.2.6p5-29.amzn2.0.1
amazon linux 2ntpdate4.2.6p5-29.amzn2.0.1
amazon linux 2sntp4.2.6p5-29.amzn2.0.1
debian 11ntpno fix listed
Oracle Linux 6ntp4.2.6p5-15.0.1.el6_10
Oracle Linux 6ntp-doc4.2.6p5-15.0.1.el6_10
Oracle Linux 6ntp-perl4.2.6p5-15.0.1.el6_10
Oracle Linux 6ntpdate4.2.6p5-15.0.1.el6_10
Oracle Linux 7ntp4.2.6p5-29.0.1.el7
Oracle Linux 7ntp-doc4.2.6p5-29.0.1.el7
Oracle Linux 7ntp-perl4.2.6p5-29.0.1.el7
Oracle Linux 7ntpdate4.2.6p5-29.0.1.el7
Oracle Linux 7sntp4.2.6p5-29.0.1.el7
ubuntu 14.04-ESMntp1:4.2.6.p5+dfsg-3ubuntu2.14.04.13+esm1
ubuntu 16.04ntp1:4.2.8p4+dfsg-3ubuntu5.10
ubuntu 16.04-ESMntp1:4.2.8p4+dfsg-3ubuntu5.10
ubuntu 18.04-ESMntp1:4.2.8p10+dfsg-5ubuntu7.3+esm1

References

All 16 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.