1. CVE archive
  2. Vulnerability types
  3. CWE-242
CWE-242 · #448 most frequent type in the archive

Use of Inherently Dangerous Function

The product calls a function that can never be guaranteed to work safely, regardless of how it is used.

8CVEs of this type in the archive
1critical (CVSS ≥ 9)
7high severity (7–8.9)
Jul 30, 2026latest published

What it is

The product calls a function that can never be guaranteed to work safely, regardless of how it is used.

Impact on systems

ScopeImpact
Other Varies by Context
The consequences vary depending on the behavior of the affected function.
Other Modify Memory
Some functions can be subject to buffer overflows. For example, an attacker can easily send arbitrarily-sized input to gets() and overflow the destination buffer. In C++, an attacker can easily send arbitrarily-sized input to the >> operator and overflow the destination buffer.

How to prevent it

Build and Compilation · Implementation Identify a list of prohibited API functions and prohibit developers from using these functions, providing safer alternatives. In some cases, automatic code analysis tools or the compiler can be instructed to spot use of prohibited functions, such as the banned.h include file from Microsoft's SDL.
Testing Use grep or static analysis tools to spot usage of dangerous functions.

Source: MITRE CWE catalog · Official entry on the MITRE website

CWE-242 CVEs published per year

2026: year in progress, updated every hour

Show the data as a table
YearCVE
20211
20221
20231
20241
20252
20262

All CWE-242 CVEs

8 results

Dottor Marc

Is this type of vulnerability in your systems?

An archive tells you what exists; a Vulnerability Assessment tells you what is exposed on your side. Dottor Marc tests your web applications and network with automated and manual checks.