nerdexam
CompTIA

SY0-501 · Question #136

Which of the following attack types BEST describes a client-side attack that is used to mandate an HTML iframe with JavaScript code via web browser?

The correct answer is C. xss. The attack described, involving injecting HTML iframes with JavaScript into a web browser via a client-side attack, is best characterized as Cross-Site Scripting (XSS).

Submitted by deeparc· Mar 4, 2026Threats, vulnerabilities, and mitigations

Question

Which of the following attack types BEST describes a client-side attack that is used to mandate an HTML iframe with JavaScript code via web browser?

Options

  • ABuffer overflow
  • BMITM
  • Cxss
  • DSQLi

How the community answered

(53 responses)
  • A
    9% (5)
  • B
    17% (9)
  • C
    70% (37)
  • D
    4% (2)

Why each option

The attack described, involving injecting HTML iframes with JavaScript into a web browser via a client-side attack, is best characterized as Cross-Site Scripting (XSS).

ABuffer overflow

Buffer overflow is a memory corruption vulnerability where data overwrites adjacent memory buffers, typically leading to server-side application crashes or arbitrary code execution, not client-side browser script injection.

BMITM

Man-in-the-Middle (MITM) describes an attack where an attacker intercepts communication between two parties, but it refers to the interception method rather than the specific client-side script injection vulnerability itself.

CxssCorrect

Cross-Site Scripting (XSS) is a client-side code injection attack where an attacker injects malicious scripts, typically JavaScript, into a legitimate website or web application. These scripts are then executed by the victim's web browser, allowing the attacker to manipulate the DOM, such as mandating an HTML iframe, steal session cookies, or redirect users.

DSQLi

SQL Injection (SQLi) is a code injection technique used to attack data-driven applications by inserting malicious SQL statements into an entry field for execution by the database, not for client-side browser manipulation.

Concept tested: Cross-Site Scripting (XSS) attack type

Source: https://learn.microsoft.com/en-us/azure/architecture/framework/security/design-application#owasp-top-10---web-application-security

Topics

#XSS#client-side attacks#JavaScript injection#iframe

Community Discussion

No community discussion yet for this question.

Full SY0-501 Practice