nerdexam
CompTIA

CAS-003 · Question #294

Given the code snippet below: Which of the following vulnerability types in the MOST concerning?

The correct answer is B. Buffer overflow in the username parameter could lead to a memory corruption vulnerability. A buffer overflow vulnerability in the username parameter is the most concerning because it can allow an attacker to overwrite adjacent memory, corrupt program execution flow, inject arbitrary shellcode, and potentially gain full control of the system. This is a critical…

Research, Development and Collaboration

Question

Given the code snippet below:

Which of the following vulnerability types in the MOST concerning?

Options

  • AOnly short usernames are supported, which could result in brute forcing of credentials.
  • BBuffer overflow in the username parameter could lead to a memory corruption vulnerability.
  • CHardcoded usernames with different code paths taken depend on which user is entered.
  • DFormat string vulnerability is present for admin users but not for standard users.

How the community answered

(50 responses)
  • A
    6% (3)
  • B
    76% (38)
  • C
    14% (7)
  • D
    4% (2)

Explanation

A buffer overflow vulnerability in the username parameter is the most concerning because it can allow an attacker to overwrite adjacent memory, corrupt program execution flow, inject arbitrary shellcode, and potentially gain full control of the system. This is a critical, high-severity vulnerability class that can lead to remote code execution (RCE). Option A (short username limit enabling brute force) is a lower-severity operational concern. Option C (hardcoded usernames with different code paths) is a logic flaw and information disclosure risk but not as immediately exploitable as a memory corruption issue. Option D (format string vulnerability) is serious but is scoped only to admin users per the scenario, whereas buffer overflow affects any user input path.

Topics

#buffer overflow#memory corruption#code vulnerability analysis#secure coding

Community Discussion

No community discussion yet for this question.

Full CAS-003 Practice