CVE-2023-4012 is a remote crash in NTPsec 1.2.2: ntpd that is not set up as an NTS server segfaults when a client sends an NTS-enabled time request (mode 3), so anyone who can reach UDP port 123 can stop time service. NVD scores it 7.5. It is fixed in 1.2.2a, and Buildroot and Yocto shipped 1.2.2.
Vulnerability summary
CVSS base score
7.5
High severity
EPSS score (FIRST)
0.4%
Probability of exploitation in the wild in the next 30 days
CISA KEV catalog
No
Not listed
Published
Vulnerability ID: CVE-2023-4012 · Source: NVD
Affected components
| Component | CPE | Version range |
|---|---|---|
| NTPsec ntpd (NTS cookie handling when NTS is disabled) | cpe:2.3:a:ntpsec:ntpsec:1.2.2:*:*:*:*:*:*:* | 1.2.2; fixed in 1.2.2a (2023-08-02) (NVD, NTPsec NEWS) |
| Buildroot package ntpsec | — | 1.2.2 from 2023-01-07; security bump to 1.2.2a on 2023-08-08 (Buildroot commit 642b4292) |
| Yocto Project meta-networking ntpsec | — | 1.2.2 on master from 2023-01-25 and on the mickledore branch; master moved to 1.2.2a on 2023-09-22 (meta-openembedded) |
What does this mean for affected devices?
NVD's description of CVE-2023-4012 is one sentence: "ntpd will crash if the server is not NTS-enabled (no certificate) and it receives an NTS-enabled client request (mode 3)." NVD scores it 7.5 (high), vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, the same as GitLab's score as the CNA, and its configuration lists NTPsec 1.2.2 only. GitLab records CWE-372; NVD records no CWE. CISA's SSVC entry in the NVD record reads exploitation none, automatable yes, technical impact partial (NVD).
The bug was found in the field, not in a lab. NTPsec issue 794, opened on 2023-07-22, forwards a Debian bug from a server running Debian's stock ntp.conf, which has no NTS settings. ntpd "randomly crashes in a few hours" with a segfault in aesni_set_encrypt_key in libcrypto. The cause was that ntpd tried to decode an NTS cookie from a client request even though it had no NTS keys. The fix commit d9a786f makes nts_unpack_cookie() return early when no keys exist and adds an nts_cookie_not_server counter that ntpq can show. The NTPsec NEWS file dates 1.2.2a to 2023-08-02, and the release post followed on 2023-08-03.
For devices the trigger matters more than the score. Every ntpd that serves time answers mode 3 client requests, and NTS is off by default, so a gateway, controller or appliance that runs NTPsec 1.2.2 as a LAN or public time server is exposed with its default configuration. A device that only syncs its own clock and drops inbound UDP 123 is outside the path. No CISA ICS advisory in CISA's CSAF repository names this CVE (searched 2026-11-17), so the exposure comes through embedded Linux build systems that package NTPsec:
- Buildroot moved its ntpsec package to 1.2.2 on 2023-01-07 and made a security bump to 1.2.2a on 2023-08-08, "Fixes CVE-2023-4012". The 2023.02.x long-term branch builds 1.2.2a (checked 2026-11-17), but an image built from a 2023 tree before August still carries 1.2.2.
- Yocto Project meta-networking moved to 1.2.2 on 2023-01-25 and to 1.2.2a on 2023-09-22. The mickledore branch recipe is still
ntpsec_1.2.2.bbwith no CVE patch (checked 2026-11-17), so images built on that release need a local fix.
The Debian Security Tracker lists buster and bullseye as not affected because the "vulnerable code [was] introduced later", bookworm fixed in 1.2.2+dfsg1-1+deb12u1 (DSA-5466-1), and unstable in 1.2.2+dfsg1-2. That matches NVD listing 1.2.2 alone.
Our NTP and chrony vulnerabilities in embedded firmware guide covers this fix alongside the later NTPsec NTS bugs and shows how to tell NTPsec from ntp.org ntpd in an image. The Yocto and Buildroot SBOM guide shows how to read the package version a build actually used. For other remote NTP daemon crashes, see CVE-2016-6301 in BusyBox ntpd and CVE-2013-5211 in ntp.org ntpd.
CVE-2023-4012 is not in the CISA KEV catalog as of 2026-11-17 (catalog version 2026.11.13). FIRST EPSS gives it 0.0045, the 40th percentile, in the 2026-11-16 dataset (CISA KEV, FIRST EPSS).
To fix it, upgrade NTPsec to 1.2.2a or later; the current release on 2026-11-17 is 1.2.6, which also fixes later NTS server bugs. On a device that must stay on 1.2.2 for now, the fix commit is small enough to backport. A device that has no reason to serve time should drop inbound UDP 123 regardless.
Evidence
- ntpd crashes if the server is not NTS-enabled (no certificate) and receives an NTS-enabled client request (mode 3); NVD Primary and GitLab CNA CVSS 3.1 7.5; CPE ntpsec 1.2.2 only; CWE-372 (GitLab), NVD-CWE-noinfo (NVD); CISA ADP SSVC exploitation none, automatable yes, technical impact partial; published 2023-08-07. — NVD
- Issue 794 opened 2023-07-22 from Debian bug 1038422; Debian stock ntp.conf; ntpd randomly crashes in a few hours; segfault in libcrypto aesni_set_encrypt_key; closed 2023-08-04. — NTPsec issue 794
- Commit d9a786f (2023-07-23): nts_unpack_cookie returns false when nts_nKeys is 0; adds nts_cookie_not_server counter to ntpq. — NTPsec commit d9a786f
- 2023-08-02: 1.2.2a, fix a crash in ntpd if NTS is disabled and an NTS-enabled client request (mode 3) is received (CVE-2023-4012); 1.2.6 released 2026-10-20. — NTPsec NEWS
- Version 1.2.2a announced Aug 3, 2023. — NTPsec Project Blog
- package/ntpsec bumped to 1.2.2 on 2023-01-07; security bump to 1.2.2a on 2023-08-08, Fixes CVE-2023-4012; 2023.02.x branch NTPSEC_VERSION = 1.2.2a (checked 2026-11-17). — Buildroot
- meta-networking ntpsec 1.2.1 to 1.2.2 on 2023-01-25; 1.2.2 to 1.2.2a on 2023-09-22 citing CVE-2023-4012; mickledore branch ntpsec_1.2.2.bb with no CVE patch, nanbield and scarthgap 1.2.2a (checked 2026-11-17). — meta-openembedded
- Buster and bullseye not affected (vulnerable code introduced later); bookworm fixed in 1.2.2+dfsg1-1+deb12u1 (DSA-5466-1); unstable 1.2.2+dfsg1-2. — Debian Security Tracker
- Not in the CISA KEV catalog as of 2026-11-17 (catalog version 2026.11.13). — CISA KEV
- EPSS 0.0045 (40th percentile), dataset 2026-11-16, read 2026-11-17. — FIRST EPSS

Related advisories
Sources
Frequently asked questions
Does CVE-2023-4012 affect devices that do not use NTS?
Yes, that is the affected case. NTPsec 1.2.2 crashes when NTS is not configured on the server and a client sends an NTS-enabled request. A server with NTS keys set up handles the cookie normally (per NVD and NTPsec issue 794).
Which NTPsec versions are affected by CVE-2023-4012?
NVD lists NTPsec 1.2.2 only, and Debian marks its 1.2.0 and older packages not affected because the vulnerable code came later. The fix shipped in 1.2.2a on 2023-08-02 (per NVD, the Debian Security Tracker and NTPsec NEWS).
Did Buildroot and Yocto ship the vulnerable NTPsec version?
Yes. Buildroot shipped 1.2.2 from 2023-01-07 until its 1.2.2a bump on 2023-08-08, and Yocto's mickledore branch recipe is ntpsec 1.2.2 with no CVE patch, checked 2026-11-17 (per the Buildroot and meta-openembedded repositories).
Is CVE-2023-4012 in the CISA KEV catalog?
No, not as of 2026-11-17 (catalog version 2026.11.13). FIRST EPSS gives it 0.0045, the 40th percentile, in the 2026-11-16 dataset (per CISA KEV and FIRST EPSS).
Questions about this page?