Cyber Resilience

CWE · MITRE source

CWE-170Improper Null Termination

Abstraction: Base · CVEs in our corpus: 53

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.

Prevent
Stop it (NIST 800-53 / CSF Protect)
  • PR.PS-06
  • SA-11 Developer Testing and Evaluation
  • SA-15 Development Process, Standards, and Tools
  • SI-10 Information Input Validation
Detect
Catch it (CSF Detect / Respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)

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 8.69.80.21952021-08-16
CVE-2019-8275 7.99.80.03972019-03-08
CVE-2021-31886 7.89.80.03032021-11-09
CVE-2021-31884 7.69.80.01452021-11-09
CVE-2026-5067 7.49.80.00642026-06-09
CVE-2026-8721 7.39.80.00452026-05-17
CVE-2021-1471 7.29.90.01322021-03-24
CVE-2021-1411 7.29.90.01382021-03-24
CVE-2021-1469 7.19.90.01032021-03-24
CVE-2021-1417 7.19.90.00962021-03-24
CVE-2021-1418 7.19.90.00942021-03-24
CVE-2021-31887 7.08.80.02372021-11-09
CVE-2021-31888 7.08.80.02372021-11-09
CVE-2026-55738 6.58.80.00402026-06-17
CVE-2024-45288 6.28.40.00302024-09-05
CVE-2025-67733 6.28.50.00592026-02-23
CVE-2022-47515 6.17.50.01152022-12-18
CVE-2023-24021 6.07.50.00912023-01-20
CVE-2024-21442 6.07.80.00832024-03-12
CVE-2024-43474 6.07.60.01262024-09-10
CVE-2026-34464 6.08.80.00172026-05-05
CVE-2026-457986.07.50.00892026-08-19
CVE-2024-31484 5.97.80.00472024-05-14
CVE-2025-627925.87.50.00362025-10-29
CVE-2025-677905.87.50.00322025-12-17