CWE · MITRE source
CWE-170Improper Null Termination
The product does not terminate or incorrectly terminates a string or array with a null character or equivalent terminator.
Null termination errors frequently occur in two different ways. An off-by-one error could cause a null to be written out of bounds, leading to an overflow. Or, a program could use a strncpy() function call incorrectly, which prevents a null terminator from being added at all. Other scenarios are possible.
Last updated: 20 August 2026 14:15 UTC
Control responseHuman-reviewed
Answering this weakness across the control lifecycle, from our framework cross-walks.
NIST 800-53 r5 controls that address this weakness (0)AI-assisted
| Control | Title | Family | Why it addresses this CWE |
|---|---|---|---|
| No NIST controls proposed yet. | |||
Top CVEs of this weakness type, ranked by Risk Priority
| CVE | Risk | CVSS | EPSS | Published |
|---|---|---|---|---|
CVE-2021-22931 UPD | 8.6 | 9.8 | 0.2195 | 2021-08-16 |
CVE-2019-8275 UPD | 7.9 | 9.8 | 0.0397 | 2019-03-08 |
CVE-2021-31886 UPD | 7.8 | 9.8 | 0.0303 | 2021-11-09 |
CVE-2021-31884 UPD | 7.6 | 9.8 | 0.0145 | 2021-11-09 |
CVE-2026-5067 UPD | 7.4 | 9.8 | 0.0064 | 2026-06-09 |
CVE-2026-8721 UPD | 7.3 | 9.8 | 0.0045 | 2026-05-17 |
CVE-2021-1471 UPD | 7.2 | 9.9 | 0.0132 | 2021-03-24 |
CVE-2021-1411 UPD | 7.2 | 9.9 | 0.0138 | 2021-03-24 |
CVE-2021-1469 UPD | 7.1 | 9.9 | 0.0103 | 2021-03-24 |
CVE-2021-1417 UPD | 7.1 | 9.9 | 0.0096 | 2021-03-24 |
CVE-2021-1418 UPD | 7.1 | 9.9 | 0.0094 | 2021-03-24 |
CVE-2021-31887 UPD | 7.0 | 8.8 | 0.0237 | 2021-11-09 |
CVE-2021-31888 UPD | 7.0 | 8.8 | 0.0237 | 2021-11-09 |
CVE-2026-55738 UPD | 6.5 | 8.8 | 0.0040 | 2026-06-17 |
CVE-2024-45288 UPD | 6.2 | 8.4 | 0.0030 | 2024-09-05 |
CVE-2025-67733 UPD | 6.2 | 8.5 | 0.0059 | 2026-02-23 |
CVE-2022-47515 UPD | 6.1 | 7.5 | 0.0115 | 2022-12-18 |
CVE-2023-24021 UPD | 6.0 | 7.5 | 0.0091 | 2023-01-20 |
CVE-2024-21442 UPD | 6.0 | 7.8 | 0.0083 | 2024-03-12 |
CVE-2024-43474 UPD | 6.0 | 7.6 | 0.0126 | 2024-09-10 |
CVE-2026-34464 UPD | 6.0 | 8.8 | 0.0017 | 2026-05-05 |
CVE-2026-45798 | 6.0 | 7.5 | 0.0089 | 2026-08-19 |
CVE-2024-31484 UPD | 5.9 | 7.8 | 0.0047 | 2024-05-14 |
CVE-2025-62792 | 5.8 | 7.5 | 0.0036 | 2025-10-29 |
CVE-2025-67790 | 5.8 | 7.5 | 0.0032 | 2025-12-17 |