CWE · MITRE source
CWE-242Use of Inherently Dangerous Function
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: 04 July 2026 00:28 UTC
Cumulative inbound coverage
How completely the frameworks we cross-walk collectively cover this — the verdict is the strongest single mapping (overlapping partials are not summed); breadth shows the corroboration behind it.
Collective: mostly · 5 mapping(s) from 1 framework(s): ATT&CK 5 (mostly)
NIST 800-53 r5 controls that address this weakness (0)AI
| Control | Title | Family | Why it addresses this CWE |
|---|---|---|---|
| No NIST controls proposed yet. | |||
MITRE ATT&CK techniques this weakness enables
Our own two-way CWE↔ATT&CK cross-walk — a direct mapping with no public source (the CWE→CAPEC→ATT&CK chain leaves most top weaknesses, incl. XSS and SQLi, mapped to nothing). Drafted by Grok and spot-checked by Claude Opus 4.8.
Direction: ← other covers this;
→ this covers other (F/M/P = full / mostly /
partial).
Top CVEs of this weakness type, ranked by Risk Priority
| CVE | Risk | CVSS | EPSS | Published |
|---|---|---|---|---|
CVE-2017-1002157 | 7.0 | 9.8 | 0.0280 | 2019-01-10 |
CVE-2024-52324 | 7.0 | 9.8 | 0.0069 | 2024-12-06 |
CVE-2017-0904 | 5.5 | 8.1 | 0.0242 | 2017-11-13 |
CVE-2021-42543 | 5.5 | 7.8 | 0.0077 | 2021-11-05 |
CVE-2022-36310 | 5.5 | 8.8 | 0.0133 | 2022-08-16 |
CVE-2021-40698 | 5.5 | 7.4 | 0.0054 | 2023-09-07 |
CVE-2025-1331 UPD | 5.5 | 7.8 | 0.0023 | 2025-05-08 |
CVE-2025-49215 UPD | 5.5 | 8.8 | 0.0034 | 2025-06-17 |
CVE-2025-1994 UPD | 5.5 | 7.8 | 0.0015 | 2025-08-26 |
CVE-2026-6477 UPD | 5.5 | 8.8 | 0.0046 | 2026-05-14 |