← NASA Interview Insights

NASA·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Interviewed for a security analyst role at NASA, one question deep into the technical screen and it was a pretty foundational one about XSS. Not a bad experience, just short on details I can share.

Questions Asked (1)

Q1

Can you explain what a cross-site scripting (XSS) attack is and how it works?

Technical Trade-offsRoot Cause Analysis
Author's notes

Covered the basics: malicious scripts injected into trusted sites, runs in the victim's browser, can steal session cookies or redirect users.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Define XSS clearly, then explain the three main types (stored, reflected, DOM-based) with a simple example. Describe the attack flow from injection to execution, and briefly mention prevention techniques like input validation and output encoding.

Pro tip: Emphasize that XSS exploits trust in a site's content, and relate it to NASA's context by noting the importance of securing web applications that handle sensitive data or control systems.

1. Define XSS

State that XSS is a code injection attack where malicious scripts are executed in a victim's browser, often to steal data or hijack sessions.

2. Explain the types

Briefly describe stored (persistent), reflected (non-persistent), and DOM-based XSS, highlighting how each delivers the payload.

3. Walk through an attack scenario

Use a concrete example, such as a comment field that stores a script, which then runs when other users view the page.

4. Discuss impact

Mention consequences like cookie theft, session hijacking, defacement, and keylogging, tying to potential risks in critical systems.

5. Cover prevention

List key defenses: input validation, output encoding, Content Security Policy (CSP), and using secure frameworks.

Key Points to Mention

  • XSS is a client-side code injection attack.
  • Three main types: stored, reflected, DOM-based.
  • Attack vector: unsanitized user input rendered as HTML/JS.
  • Impact: session hijacking, data theft, defacement.
  • Prevention: input validation, output encoding, CSP.
  • Example: malicious script in a comment or URL parameter.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.