Security Resilience

CWE · MITRE source

CWE-242Use of Inherently Dangerous Function

Abstraction: Base · CVEs in our corpus: 11

The product calls a function that can never be guaranteed to work safely.

Certain functions behave in dangerous ways regardless of how they are used. Functions in this category were often implemented without taking security concerns into account. The gets() function is unsafe because it does not perform bounds checking on the size of its input. An attacker can easily send arbitrarily-sized input to gets() and overflow the destination buffer. Similarly, the >> operator is unsafe to use when reading into a statically-allocated character array because it does not perform bounds checking on the size of its input. An attacker can easily send arbitrarily-sized input to the >> operator and overflow the destination buffer.

Last updated: 14 October 2026 20:41 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-8 Security and Privacy Engineering Principles
  • SA-15 Development Process, Standards, and Tools
Detect
Catch it (CSF Detect / Respond)

—

Harden
Shrink the surface (DISA STIG)

—

Validate
Prove the fix (OWASP ASVS)

—

NIST 800-53 r5 controls PROPOSED for this weakness (0)AI-assisted

These are model PROPOSALS, not graded mappings. They come from controls_to_cwe_proposals, which carries no grade field at all; across the CWE pages 1,540 of 1,722 such associations (89%) have never been graded by anything. The heading said “address” until 2026-09-29, which asserted a relationship the data does not carry. Graded cross-walks are on the framework map, not here.

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-2017-1002157 7.89.80.02882019-01-10
CVE-2024-523247.49.80.00692024-12-06
CVE-2022-36310 6.98.80.01582022-08-16
CVE-2026-6477 6.68.80.00452026-05-14
CVE-2017-0904 6.58.10.02422017-11-13
CVE-2025-49215 6.58.80.00332025-06-17
CVE-2021-42543 6.07.80.00812021-11-05
CVE-2025-1331 5.77.80.00282025-05-08
CVE-2025-1994 5.67.80.00162025-08-26
CVE-2021-40698 5.57.40.00552023-09-07
CVE-2026-11980 5.37.30.00172026-07-30