CVE-2018-12327: Stack-based buffer overflow in ntpq and ntpdc of NTP version 4.2.8p11 allows an attacker to achieve code execu
CVE-2018-12327 is a critical-severity flaw (CVSS 9.8) affecting ntp. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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.
Why this priority
- Critical severity
- EPSS top 2%: very likely to be exploited
- Public exploit reference
- Remotely exploitable, no login, no user action
A fixed release or distro patch exists.
Risk facts
| CVSS score | 9.8 (Critical) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 27.5% (top 2%) |
| CISA exploited list | No |
| Weakness | CWE-787 |
| Published | 2018-06-20 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Exact fixes by distribution
Public exploits and detection
Public code exists for this CVE. Treat unpatched systems as at risk, and only run PoCs in a lab.
- Write-up: support.hpe.com/hpsc/doc/public/display?docLocale=en_US&docId=emr_na-hpesbux03962en_us
- Write-up: usn.ubuntu.com/4229-1/
- Write-up: www.exploit-db.com/exploits/44909/
- Exploit-DB: ntp 4.2.8p11 - Local Buffer Overflow (PoC)
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2018-12327?
ntp: downgrade or apply the listed mitigation. Exact commands for each OS are on this page.
Is CVE-2018-12327 being exploited?
CVE-2018-12327 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2018-12327 affect?
CVE-2018-12327 affects ntp. Severity is critical (CVSS 9.8). 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 un
How urgent is CVE-2018-12327?
Priority 69/100. Critical severity; EPSS top 2%: very likely to be exploited; Public exploit reference; Remotely exploitable, no login, no user action
Related CVEs
- CVE-2023-26555 MEDIUM 6.4 DOWNGRADE praecis_parse in ntpd/refclock_palisade.c in NTP 4.2.8p15 has an out-of-bounds write
- CVE-2023-26554 MEDIUM 5.6 DOWNGRADE mstolfp in libntp/mstolfp.c in NTP 4.2.8p15 has an out-of-bounds write when adding a '\0' character
- CVE-2023-26553 MEDIUM 5.6 DOWNGRADE mstolfp in libntp/mstolfp.c in NTP 4.2.8p15 has an out-of-bounds write when copying the trailing number
- CVE-2023-26552 MEDIUM 5.6 DOWNGRADE mstolfp in libntp/mstolfp.c in NTP 4.2.8p15 has an out-of-bounds write when adding a decimal point
- CVE-2023-26551 MEDIUM 5.6 DOWNGRADE mstolfp in libntp/mstolfp.c in NTP 4.2.8p15 has an out-of-bounds write in the cp<cpdec while loop