# CVE-2021-22212: ntpkeygen can generate keys that ntpd fails to parse.

- Severity: Medium 4.0 (CVSS:3.1, scored by GitLab) `CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.52%, higher than 45% of CVEs (2026-12-01)
- Published: 2021-06-08T12:07:02.000Z
- Modified: 2026-06-17T03:36:48.917Z
- Weaknesses: CWE-327
- Assigned by: GitLab

## Description

ntpkeygen can generate keys that ntpd fails to parse. NTPsec 1.2.0 allows ntpkeygen to generate keys with '#' characters. ntpd then either pads, shortens the key, or fails to load these keys entirely, depending on the key type and the placement of the '#'. This results in the administrator not being able to use the keys as expected or the keys are shorter than expected and easier to brute-force, possibly resulting in MITM attacks between ntp clients and ntp servers. For short AES128 keys, ntpd generates a warning that it is padding them.

(As written by CVE List.)

## Affected

- NTPsec ntpsec: =1.2.0; 1.2.0
- fedoraproject fedora: 34

## Every score

- GitLab: CVSS:3.1 4.0 Medium `CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:N/I:H/A:N`
- NVD: CVSS:3.1 7.4 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`
- NVD: CVSS:2.0 5.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:N`

## References

- <https://gitlab.com/NTPsec/ntpsec/-/issues/699> (issue-tracking, patch, third-party-advisory)
- <https://bugzilla.redhat.com/show_bug.cgi?id=1955859> (issue-tracking, patch, third-party-advisory)
- <https://gitlab.com/gitlab-org/cves/-/blob/master/2021/CVE-2021-22212.json> (third-party-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3GIT2HYL5BQXPGKI6ZDNG473IEQ5WQF2/> (vendor-advisory)

## Sources

- CVE List: [CVE-2021-22212](https://www.cve.org/CVERecord?id=CVE-2021-22212), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-22212](https://nvd.nist.gov/vuln/detail/CVE-2021-22212), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-22212 · Whole record: https://cve.day/CVE-2021-22212.json · Rebuilt by cve.day 2026-11-25T22:58:01.684Z
