CWE-242Use of Inherently Dangerous Function

PUBLISHEDweakness recordHigh
released 2006-07-19 · last modified 2026-04-30

Metadata

CWE ID:
CWE-242
摘要:
Base
结构:
Simple
状态:
Draft
发布日期:
2006-07-19
更新日期:
2026-04-30

名称

Use 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.

常见后果

范围:
Other
影响:
Varies by Context

相关 CWE