Property
Languagec
Severitymedium
CWECWE-676: Use of Potentially Dangerous Function
Confidence LevelLow
Impact LevelHigh
Likelihood LevelLow

Description#

Using ‘scanf()’ to read input can easily lead to buffer overflows because it doesn’t limit how much data is read into a buffer. This makes your code unsafe, especially when handling user input.

Impact#

If exploited, an attacker could provide input that overflows the buffer, potentially allowing them to crash the program, corrupt memory, or execute malicious code. This can lead to serious security breaches, including system compromise or data leaks.