← All articles
12 min read

Security Engineer Interview Questions and Prep Guide (2026)

Security engineer interviews are really four different interviews depending on the role. This guide maps AppSec, infrastructure, detection, and product security roles to their rounds, with a worked threat model and real practice questions.

Security engineer interview questions test whether you can find, explain, and fix real security problems, not whether you can recite definitions. Most loops in 2026 combine web vulnerability fundamentals (the OWASP Top 10), networking and crypto basics, a threat modeling exercise, a secure code review, a scripting round, and incident response scenarios. The mix shifts sharply depending on which of the four security engineer archetypes you are interviewing for, so identify your archetype first and prepare for its rounds.

Key Takeaways

  • "Security engineer" covers four different jobs: AppSec, infrastructure/cloud security, detection and response, and product security. Each has a different loop.
  • Threat modeling is the round that separates senior candidates. Practice on boring features (password reset, file upload, share links) with STRIDE and a prioritized mitigation list.
  • Secure code review rounds reward a system: trace untrusted input to dangerous sinks, then check authorization on every object access.
  • The coding round is usually practical Python, such as parsing auth logs or hitting an API, not hard dynamic programming.
  • Study the OWASP Top 10 2025 edition, but focus on exploiting and fixing each class, not memorizing numbers.

What Are the Four Security Engineer Archetypes?

A security engineer archetype is the flavor of security work a role actually does day to day. Job titles are inconsistent across companies, so read the job description and ask the recruiter which bucket the role falls into. The table below maps each archetype to the rounds you are most likely to see.

ArchetypeDay-to-day workRounds that carry the most weightCoding expectation
Application security (AppSec)Code review, SAST/DAST tooling, bug bounty triage, developer trainingSecure code review, web vulnerabilities, threat modelingScripting plus reading code in several languages
Infrastructure / cloud securityIAM, network segmentation, Kubernetes hardening, secrets managementCloud architecture review, networking, infra designScripting and infrastructure-as-code
Detection and responseWriting detections, triaging alerts, running incidentsIncident response scenarios, log analysis, attacker techniquesLog parsing and query languages
Product securityEmbedded with a product team, designing and shipping secure featuresThreat modeling, system design, codingClose to software engineer level

Two practical notes. First, smaller companies often hire one "security engineer" who covers all four, and the loop will sample from each. Second, product security loops at large tech companies can include a standard algorithms round, so check with your recruiter rather than assuming the coding will be light.

Web Vulnerability Questions: The OWASP Top 10

Web vulnerability questions are the foundation of every AppSec and product security loop, and they show up in screens for the other archetypes too. The current reference list is the OWASP Top 10, whose 2025 edition reorganized several categories compared to 2021.

2025 categoryWhat to be ready to explain
A01 Broken Access ControlIDOR, missing function-level checks, SSRF (now grouped here), CORS mistakes
A02 Security MisconfigurationDefault credentials, verbose errors, open storage buckets, permissive headers
A03 Software Supply Chain FailuresDependency confusion, typosquatting, compromised build pipelines, SBOMs
A04 Cryptographic FailuresWeak algorithms, missing TLS, hardcoded keys, poor password hashing
A05 InjectionSQL, command, and template injection; XSS
A06 Insecure DesignMissing rate limits, flawed business logic, no threat model
A07 Authentication FailuresCredential stuffing, session fixation, weak MFA flows
A08 Software or Data Integrity FailuresUnsigned updates, insecure deserialization
A09 Security Logging and Alerting FailuresNo audit trail, alerts nobody watches
A10 Mishandling of Exceptional ConditionsFail-open error handling, unhandled edge cases that leak data

Interviewers rarely ask "what is A03?" They ask questions that make you reason through a class end to end:

  • Walk me through how stored XSS works, and why a Content Security Policy helps but does not replace output encoding.
  • How does CSRF work, and why do SameSite cookies reduce but not fully remove the risk?
  • An endpoint fetches a URL the user supplies. What can go wrong, and how would you block access to the cloud metadata service?
  • Why are parameterized queries safe when string escaping is not?
  • How would you store passwords today? (Expect to name a slow, salted algorithm such as Argon2id, bcrypt, or scrypt, and explain why fast hashes like SHA-256 are wrong for this.)

A strong answer has three parts: how the attack works, what impact it has in this specific system, and the layered fix. Mentioning defense in depth without a concrete primary fix sounds evasive.

Networking and Crypto Fundamentals

Networking and crypto questions check that your mental model goes below the application layer. You do not need to implement AES, but you must explain what each primitive guarantees and when people misuse it.

The questions that come up most often:

  • What happens when you type a URL and press enter? Go deep on DNS resolution, the TCP handshake, and the TLS 1.3 handshake. Mention certificate validation and where an attacker could interfere (DNS spoofing, a rogue CA, downgrade attempts).
  • Symmetric vs asymmetric encryption. Symmetric is fast and used for bulk data; asymmetric solves key exchange and signatures. TLS uses both.
  • Hashing vs encryption vs encoding. Hashing is one-way, encryption is reversible with a key, and encoding (Base64) provides no secrecy at all.
  • What is an HMAC and why not just hash(secret + message)? Naive constructions with SHA-256 are vulnerable to length extension; HMAC is not.
  • Why is ECB mode bad? Identical plaintext blocks produce identical ciphertext blocks, leaking structure. Prefer an authenticated mode like AES-GCM.
  • How does CORS differ from the same-origin policy? The same-origin policy restricts reads; CORS is a controlled relaxation of it, not a security feature that blocks requests.

Infrastructure roles add questions on VPC design, security groups vs network ACLs, mTLS between services, and IAM least privilege. Our AWS interview questions guide and Kubernetes and Docker interview questions cover the platform details these rounds assume.

How Do You Answer a Threat Modeling Interview Question?

Threat modeling is a structured way to find what can go wrong in a system before it ships. In an interview, you get a feature or architecture and about 45 minutes to identify threats, rank them, and propose mitigations. Interviewers grade your process and your prioritization more than the length of your threat list.

Use this five-step sequence:

  1. Clarify scope and assets. What does the feature do, who uses it, and what data is worth stealing or tampering with?
  2. Draw the data flow. Clients, services, data stores, third parties. Mark every trust boundary.
  3. Enumerate threats. STRIDE (Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, Elevation of privilege) gives you coverage so you do not miss whole categories.
  4. Rank by impact and likelihood. Say which three you would fix before launch and which you would accept.
  5. Mitigate specifically. "Add auth" is weak. "Check that the requester owns the document on every read, enforced in the data access layer" is strong.

The prompt: "Our document editor is adding 'anyone with the link can view' sharing. Threat model it."

After clarifying, you establish that links are generated by the API, documents live in object storage, link visits go through a web app, and owners can revoke links. Trust boundaries sit between the anonymous browser and the web app, and between the web app and storage.

STRIDEThreatImpactLikelihoodMitigation
SpoofingAttacker guesses or brute-forces link tokensHighMedium if tokens are short128+ bits of randomness from a CSPRNG, rate limiting on lookup
TamperingLink grants view, but the edit API does not re-check permissionHighMediumEnforce link scope server side on every endpoint, not just in the UI
RepudiationOwner cannot tell who viewed a leaked docMediumHighLog link access with timestamp, IP, and token ID
Information disclosureToken leaks through Referer headers, browser history, or logsHighHighReferrer-Policy header, redact tokens in logs, expiring links
Information disclosureRevoked link still works through a cached storage URLHighMediumShort-lived signed storage URLs, check revocation on each access
Denial of serviceA viral link floods rendering workersMediumLowPer-token rate limits and caching rendered views
Elevation of privilegeLink token is accepted by internal admin endpointsCriticalLowScope tokens to a single document and a single read action

Then prioritize out loud: "Before launch I would fix token entropy, server-side scope enforcement, and revocation with signed URLs. Token leakage through logs is next. I would accept the denial of service risk initially and monitor it." That closing summary is what interviewers remember. The same rate limiting ideas are explored in our rate limiter system design walkthrough.

Threat modeling rounds move fast, and it is easy to blank on a STRIDE category under pressure. TechScreen gives you invisible real-time prompts during live security interviews on Zoom, Meet, or Teams. Try it free with 3 tokens, no credit card.

Get started free →

The Secure Code Review Round

In a secure code review round, you get 50 to 300 lines of code and 45 to 60 minutes to find the vulnerabilities, explain their impact, and suggest fixes. The code is often in a language you did not choose, so practice reading Python, Java, Go, and JavaScript.

Work in a fixed order instead of reading top to bottom:

  1. Identify sources of untrusted input: request parameters, headers, files, webhooks, environment.
  2. Identify dangerous sinks: SQL queries, shell calls, file paths, HTML rendering, outbound HTTP, deserialization.
  3. Trace each source to each sink and check for validation or encoding along the way.
  4. Check authorization on every object access. This is where IDOR bugs hide.
  5. Scan for secrets, weak crypto, and error handling that fails open.

Here is a compact practice snippet. Try to find at least four issues before reading on.

@app.route("/invoices/<invoice_id>")
@login_required
def get_invoice(invoice_id):
    query = f"SELECT * FROM invoices WHERE id = {invoice_id}"
    invoice = db.execute(query).fetchone()
    if not invoice:
        return f"<h1>Invoice {invoice_id} not found</h1>", 404
    return render_invoice(invoice)

@app.route("/invoices/import", methods=["POST"])
@login_required
def import_invoice():
    url = request.json["source_url"]
    data = requests.get(url, timeout=5).content
    return pickle.loads(data)

The findings, ranked by severity:

  • SQL injection: invoice_id is interpolated into the query. Use a parameterized query.
  • Insecure deserialization: pickle.loads on remote data allows remote code execution. Use JSON with a schema.
  • SSRF: the server fetches any user-supplied URL, including internal addresses and cloud metadata endpoints. Allowlist hosts and block private IP ranges after DNS resolution.
  • IDOR: there is no check that the invoice belongs to the current user. Add AND owner_id = ? with the session user.
  • Reflected XSS: the 404 page echoes invoice_id into HTML without escaping.

Narrating your trace matters as much as the findings. Our guide on how to think out loud in a coding interview applies directly here, and the methodical habits in the debugging interview guide transfer well to code review.

The Security Engineer Coding Interview

The security engineer coding interview is usually a practical scripting task in Python, Go, or Bash. Common prompts include parsing logs to detect an attack pattern, writing a tool to find secrets in a repository, querying a cloud API for misconfigured resources, or implementing a simple rate limiter. Clean structure and edge-case handling score higher than clever algorithms.

A classic example: given SSH auth logs, flag source IPs with five or more failed logins within any 60-second window.

import re
from collections import defaultdict, deque
from datetime import datetime

FAILED = re.compile(r"^(\w{3}\s+\d+ \d{2}:\d{2}:\d{2}) .*Failed password for .* from (\S+)")

def detect_bruteforce(lines, threshold=5, window_seconds=60, year=2026):
    recent = defaultdict(deque)
    flagged = {}
    for line in lines:
        match = FAILED.search(line)
        if not match:
            continue
        ts = datetime.strptime(f"{year} {match.group(1)}", "%Y %b %d %H:%M:%S")
        ip = match.group(2)
        window = recent[ip]
        window.append(ts)
        while (ts - window[0]).total_seconds() > window_seconds:
            window.popleft()
        if len(window) >= threshold and ip not in flagged:
            flagged[ip] = ts
    return flagged

Expect follow-ups: what if the logs are not sorted, what if the file is 50 GB, how would you avoid false positives from a corporate NAT, and how would you turn this into a production detection rule? Having answers ready shows you think like an operator, not just a scripter. Brush up on idiomatic standard library use with our Python interview questions.

Incident Response Scenario Questions

Incident response scenarios test how you think under uncertainty. The interviewer describes an alert and plays the environment while you investigate. Detection and response roles weight this round heavily, but every archetype can get one.

Typical prompts:

  • An AWS access key from a developer laptop was used from an unfamiliar country at 3 a.m. What do you do?
  • A customer reports that their data appeared on a paste site.
  • EDR flags an encoded PowerShell command spawned by a Word document on a finance laptop.
  • A popular npm dependency in your build pipeline just published a malicious version.

Structure every answer around the incident lifecycle. NIST SP 800-61, which was revised in 2025 to align with the NIST Cybersecurity Framework 2.0, is the standard reference, but a simple flow works in interviews:

PhaseWhat to say out loud
TriageConfirm it is real, assess scope and severity, decide whether to declare an incident
ContainRevoke the key, isolate the host, block the indicator, without destroying evidence
InvestigatePull CloudTrail or EDR timelines, find initial access, list what the attacker touched
Eradicate and recoverRotate credentials, rebuild hosts, patch the entry point, restore service
LearnBlameless postmortem, new detections, fixes to the control that failed

The most common mistake is jumping straight to "wipe the machine," which destroys forensic evidence. The second is forgetting communication: say when you would loop in legal, the customer, or leadership. Incident handling overlaps heavily with on-call work, so the site reliability engineer interview guide is useful extra practice.

Behavioral Questions for Security Engineers

Security behavioral rounds probe one tension above all: can you reduce risk without becoming the team that blocks everything? Expect questions like "Tell me about a time you pushed back on a launch," "Describe a vulnerability you found and how you got it fixed," and "When did you accept a risk instead of fixing it?"

Strong answers show you quantified risk, offered a path forward, and influenced engineers who did not report to you. Build four or five stories using the STAR structure from our behavioral interview guide for software engineers, and make sure at least one involves a disagreement you resolved through compromise.

A Four-Week Security Engineer Interview Prep Plan

Four focused weeks is enough for most working engineers to get interview-ready. Shift the weighting toward your archetype's heaviest rounds.

WeekFocusPractice output
1OWASP Top 10, networking, crypto fundamentalsExplain each vulnerability class aloud with exploit and fix
2Secure code reviewReview 8 to 10 snippets across Python, Java, Go, and JavaScript
3Threat modeling and designThree timed models: password reset, file upload, webhook receiver
4Scripting, incident response, behavioralTwo log-parsing scripts, three mock IR scenarios, story bank

For hands-on vulnerability practice, free labs such as PortSwigger's Web Security Academy and intentionally vulnerable apps like OWASP Juice Shop let you exploit each class instead of only reading about it. If your loop includes a design round, the backend engineer interview guide covers the system design fundamentals security reviewers build on.

Security loops pack code review, threat modeling, and incident response into one long day. TechScreen runs invisibly during screen shares and helps you structure answers in real time. Start free with 3 tokens and test it on a mock threat model first.

Get started free →

Frequently Asked Questions

What questions are asked in a security engineer interview?

Most security engineer interviews mix five question types: web vulnerability fundamentals such as injection, XSS, CSRF, SSRF, and broken access control; networking and cryptography basics like TLS, DNS, hashing, and key management; a threat modeling exercise on a realistic feature; a secure code review of a short snippet; and a scripting round, usually in Python. Detection and infrastructure roles add incident response scenarios and cloud configuration questions, while AppSec and product security roles weight code review and design more heavily.

Do security engineers have to do LeetCode-style coding interviews?

Some do, but most security loops use practical coding instead. Large tech companies sometimes run a standard algorithms round at easy to medium difficulty for security engineers. More often, the coding round asks you to write a script that parses logs, calls an API, or automates a security check. Product security roles that sit inside engineering may expect software-engineer-level coding, so ask your recruiter which format your loop uses.

How do I prepare for a threat modeling interview?

Practice on ordinary features rather than exotic systems: a password reset flow, a file upload, a document sharing link, or a webhook receiver. For each, draw the data flow, mark trust boundaries, list threats with a framework such as STRIDE, and rank them by impact and likelihood. Then propose specific mitigations and say which risks you would accept. Interviewers grade prioritization and clarity, so time-box yourself to about 30 minutes per practice run.

Which OWASP Top 10 version should I study for 2026 interviews?

Study the 2025 edition, which is the current OWASP Top 10, but know the 2021 categories too because many interviewers learned on that list. The main changes are that Software Supply Chain Failures and Mishandling of Exceptional Conditions are new categories, and SSRF was folded into Broken Access Control. Interviewers care far more about whether you can explain and fix a vulnerability than whether you remember its category number.

What is the difference between AppSec and product security roles?

Application security engineers usually work across many teams, running code review, SAST and DAST tooling, bug bounty triage, and secure development training. Product security engineers are typically embedded with one product area and act more like software engineers who own security outcomes, designing features and shipping fixes themselves. In interviews, AppSec loops lean on vulnerability breadth and code review, while product security loops add heavier design and coding rounds.

Is a security certification required to get a security engineer job?

Certifications are rarely required for security engineer roles at technology companies, though they can help you pass resume screens at larger enterprises, government contractors, and consultancies. Interview loops at tech companies test practical skill directly through code review, threat modeling, and scripting, so demonstrable work such as CVEs, bug bounty findings, open-source tools, or detection rules usually carries more weight than a credential.

How long does a security engineer interview process take?

Timelines vary by company, but a security engineer process often takes a few weeks to a couple of months from recruiter screen to offer. It usually includes a recruiter call, one or two technical screens covering fundamentals or a code review, and a final loop of four to five rounds. Roles requiring security clearance or extensive background checks, common in government and defense work, can add several weeks or months after the offer.

Ready to use AI assistance in your next interview?

TechScreen is the invisible AI assistant trusted by engineers interviewing at Google, Meta, Amazon, and hundreds of other companies. Start with 3 free tokens — no credit card required.

Ace your next interview →