Skip to main content
InterviewHubPRO
HomeTracksSection 61: Web Security & OWASP (50 Qs)
Section 61 of 6450 Questions (1 Per Page)

Web Application Security & OWASP Top 10 Master Interview Bank

OWASP Top 10 vulnerabilities, XSS, CSRF, SQL Injection, SSRF, IDOR, Content Security Policy (CSP), CORS, OAuth 2.0 / OIDC, and JWT security.

Curriculum Roadmap & Learning Path

5 Stages
Tip: Click any stage card above to instantly filter the question bank to that topic.5 Connected Milestones
50 of 50 Qs

Part 1: Candid Security Experience, Threat Modeling & Fundamentals (1 - 10)

10 Questions
1
SeniorCode#Security & Auth

Give a candid introduction of your Application Security, Defensive Engineering, and Threat Modeling experience.

I approach application security through the lens of defensive engineering and secure-by-default architecture.

2
SeniorCode#Security & Auth#System Design

The CIA Triad & Defense-in-Depth: How do you design multi-layered security controls in distributed systems?

The CIA Triad (Confidentiality, Integrity, Availability) represents the foundational pillars of information security. Defense-in-Depth mandates that no single security barrier should be trusted exclusively; if one layer is compromised, subsequent layers prevent catastrophic exploitation.

3
SeniorCode#Security & Auth#System Design

STRIDE Threat Modeling: How to systematically identify and mitigate threats in software architecture.

Created by Microsoft, STRIDE evaluates architectures against 6 fundamental attacker goals. Every architectural element (Processes, Data Flows, Data Stores, Trust Boundaries) is audited against these 6 categories.

4
SeniorCode#Security & Auth#System Design

Least Privilege & Zero Trust Architecture: Principles, microsegmentation, and identity verification.

Traditional "castle-and-moat" security assumed that once traffic passed through the corporate VPN or edge firewall, internal network traffic was inherently trustworthy. Modern Zero Trust operates on one non-negotiable rule: "Never trust, always verify.".

5
Most AskedSeniorCode#Security & Auth

Session Management & Token Storage: Why localStorage is vulnerable to XSS and how to configure secure cookies.

Single Page Applications (React, Angular, Vue) need to persist user sessions. Storing JWTs or session identifiers in the wrong browser storage medium exposes users to complete account takeover.

6
Most AskedSeniorCode#Security & Auth

CORS Protocol Deep-Dive: Preflight OPTIONS requests, credentialed origins, and the wildcard credential trap.

Severe Vulnerability: Setting Access-Control-Allow-Origin: * while attempting to authenticate requests.

7
SeniorCode#Security & Auth

Same-Origin Policy (SOP) vs. Cross-Origin Capabilities: What SOP blocks and postMessage security.

The Same-Origin Policy is the cornerstone of browser security. Two URLs share the same origin only if their Scheme (protocol), Host (domain), and Port are strictly identical.

8
SeniorCode#Security & Auth#HTTP & REST APIs

HTTP Security Headers Suite: HSTS, X-Content-Type-Options, Referrer-Policy, and Permissions-Policy.

Configuring modern HTTP security response headers transforms standard web browsers into fortified execution environments.

9
SeniorCode#Security & Auth

Modern Password Hashing: Why MD5/SHA-256 are broken, Argon2id vs. bcrypt, and memory-hard functions.

General-purpose hashing algorithms (MD5, SHA-1, SHA-256, SHA-512) are engineered for high-speed file checksums and digital signatures. They can process billions of hashes per second, making them dangerously vulnerable to GPU-based offline dictionary attacks.

10
SeniorCode#Security & Auth#Data Structures

Cryptographic Pseudo-Random Number Generators (CSPRNG): Math.random() vs. crypto.getRandomValues().

Generating security tokens, session identifiers, password reset tokens, or API keys using standard pseudo-random number generators (PRNG) introduces critical vulnerabilities.

Part 2: OWASP Top 10 & Critical Vulnerability Deep-Dives (11 - 25)

15 Questions
11
Most AskedMidCode#Security & Auth#HTTP & REST APIs

Broken Object Level Authorization (BOLA / IDOR): Why it is the #1 API vulnerability and how to prevent it.

BOLA occurs when an API endpoint uses an identifier (such as a database ID or account number) to access a resource, but fails to validate whether the authenticated user actually owns or has permission to access that specific object.

12
Most AskedMidCode#Security & Auth

Cross-Site Scripting (XSS): Reflected vs. Stored vs. DOM-Based XSS mechanics and cookie exfiltration.

XSS occurs when an application includes untrusted user data in a web page without proper validation or escaping, allowing attackers to execute arbitrary JavaScript in the victim's browser session.

13
Most AskedSeniorCode#Security & Auth#System Design

Content Security Policy (CSP): Nonce-based architecture, strict-dynamic, and eliminating unsafe-inline.

A Content Security Policy is an HTTP response header that restricts the resources (scripts, styles, images, iframes) the browser is allowed to load and execute for a given page.

14
Most AskedMidCode#Security & Auth

Cross-Site Request Forgery (CSRF): SameSite cookies, Double Submit Cookie pattern, and sync tokens.

Cross-Site Request Forgery tricks an authenticated victim's browser into sending unauthorized commands to a vulnerable web application where the victim is already logged in (exploiting the browser's automatic credential submission).

15
MidCode#SSR & Hydration

Server-Side Request Forgery (SSRF): AWS IMDSv2 protection, DNS rebinding, and egress proxies.

SSRF occurs when an attacker tricks a backend server into making HTTP requests to unexpected internal resources, cloud metadata services, or loopback interfaces that are not publicly exposed.

16
Most AskedMidCode#Databases & SQL

SQL Injection (SQLi) & Second-Order SQLi: Prepared statements, ORM vulnerabilities, and blind SQLi.

SQL Injection occurs when untrusted user input is directly concatenated into a dynamic database query string, allowing an attacker to manipulate the query's abstract syntax tree (AST).

17
MidCode#HTTP & REST APIs

Command Injection: Child process execution pitfalls (exec vs. execFile/spawn) and argument escaping.

When backend applications call system binaries (e.g., resizing images with convert, generating PDFs, running git commands), passing untrusted input directly into a shell environment allows command execution.

18
Most AskedMidCode#Security & Auth#HTTP & REST APIs

Broken Authentication & Credential Stuffing: Brute force defense, rate limiting, and password leak APIs.

Credential Stuffing is the automated testing of billions of stolen username/password pairs from third-party data breaches against login endpoints.

19
Most AskedMidCode#Memory Management#Security & Auth

Security Misconfiguration: Public cloud storage buckets, verbose error stack traces, and default configs.

Security Misconfiguration represents failures to harden the environment, including leaving default credentials active, exposing unneeded HTTP methods, leaving debugging interfaces open, and displaying verbose stack traces.

20
MidCode#Components#Security & Auth

Vulnerable & Outdated Components: Software supply chain security, typosquatting, and automated SCA.

Modern enterprise applications are composed of over 80% third-party open-source libraries. Attackers target this ecosystem through: Typosquatting: Publishing packages with names mimicking popular libraries (e.g. cross-envv or lodahs).

21
MidCode#web-security-owasp#OWASP Top 10

Software & Data Integrity Failures: Insecure deserialization and Subresource Integrity (SRI).

Deserialization is the process of restoring structured objects from a stream of bytes or JSON strings. In dynamic languages (Python, JavaScript, Java), native deserialization engines can instantiate arbitrary classes and execute code.

22
MidCode#Security & Auth

Security Logging & Monitoring Failures: Log Injection (CRLF), PII masking, and SIEM Honeytokens.

Without adequate logging and monitoring, data breaches go undetected for an average of 200+ days. However, logging sensitive data carelessly introduces massive legal and security liabilities.

23
MidCode#Components

Server-Side Template Injection (SSTI): Mechanics, template sandboxes, and remote code execution.

Server-Side Template Injection occurs when user input is concatenated directly into a template engine string (such as Jinja2, Twig, or Handlebars) rather than passed as dynamic data context.

24
MidCode#Data Structures

XML External Entity (XXE) Injection: Exploiting external DTDs, local file retrieval, and parser hardening.

XML specifications allow the definition of custom entities via Document Type Definitions (DTDs). If an XML parser resolves external entities by default, attackers can read arbitrary server files or trigger internal network requests.

25
MidCode#Forms

Mass Assignment & Object Injection: Data Transfer Object (DTO) validation and schema enforcement.

Mass Assignment occurs when software frameworks automatically bind incoming HTTP JSON body parameters directly to database entity models without an explicit whitelist.

Part 3: Authentication, Authorization & Cryptographic Standards (26 - 35)

10 Questions
26
Most AskedMidCode#Security & Auth#Data Structures

JSON Web Token (JWT) Security & Pitfalls: Algorithm confusion (alg: none), RS256 vs. HS256, and revocation.

A JSON Web Token consists of three base64url-encoded parts separated by periods: Header.Payload.Signature. Because JWTs are stateless by design, common implementation flaws create devastating vulnerabilities.

27
MidCode#CLI#Security & Auth

OAuth 2.0 & OpenID Connect (OIDC): Roles, Authorization Code Flow, and Client Credentials.

OAuth 2.0 is an authorization framework that delegates access to resources without sharing credentials (issues an accesstoken) • OpenID Connect (OIDC) is an identity layer built directly on top of OAuth 2.0 that provides user authentication (issues an idtoken containing.

28
SeniorCode#Security & Auth#Data Structures

OAuth 2.0 PKCE (Proof Key for Code Exchange): Why Implicit Flow is dead and how PKCE prevents code interception.

In the legacy OAuth 2.0 Implicit Flow, tokens were returned directly in the browser's URL fragment (#access_token=...). This exposed tokens to browser history, proxy access logs, and malicious browser extensions.

29
MidCode#Security & Auth#Data Structures

RBAC vs. ABAC: Static roles vs. dynamic contextual attributes and Open Policy Agent (OPA).

As enterprise systems grow, simple static roles become insufficient to represent real-world authorization constraints.

30
MidCode#Security & Auth#Data Structures

Symmetric vs. Asymmetric Encryption: AES-256-GCM (AEAD) vs. RSA-4096 vs. ECC Curve25519.

Encryption transforms plaintext into ciphertext to guarantee confidentiality. Modern cryptography standardizes on specific algorithms for data at rest versus key exchange.

31
MidCode#Security & Auth#Data Structures

Envelope Encryption & Key Management: Data Encryption Keys (DEK) vs. Key Encryption Keys (KEK).

Encrypting terabytes of application data directly with a central cloud Key Management Service (AWS KMS or HashiCorp Vault) is slow, expensive, and subject to API rate limits. Cloud architectures solve this using Envelope Encryption.

32
MidCode#Forms#Security & Auth

Mutual TLS (mTLS) & Cryptographic Service Identity: PKI, X.509 cert validation, and SPIFFE IDs.

In standard HTTPS, only the server presents an X.509 certificate to prove its identity to the client. In Mutual TLS (mTLS), both the client and server cryptographically validate each other's certificates against a trusted Certificate Authority (CA).

33
MidCode#Security & Auth#Data Structures

Multi-Factor Authentication (MFA): TOTP (RFC 6238) vs. FIDO2 / WebAuthn / Passkeys.

Not all Multi-Factor Authentication methods provide equal security. SMS and standard TOTP authenticator apps are vulnerable to real-time Adversary-in-the-Middle (AiTM) phishing proxies (e.g., Evilginx).

34
SeniorCode#Security & Auth#System Design

Enterprise Single Sign-On (SSO): SAML 2.0 vs. OpenID Connect (OIDC) federation architectures.

Enterprise organizations use Single Sign-On (SSO) so employees log into work applications using corporate identity providers (Okta, Azure AD, Ping Identity).

35
JuniorCode#Security & Auth#Data Structures

Cryptographic Salt, Pepper, and Nonce: Definitions, entropy rules, and preventing Rainbow Tables.

Confusing these three cryptographic components is a frequent source of implementation flaws in authentication systems.

Part 4: Browser Security, HTTP Headers & Client Hardening (36 - 42)

7 Questions
36
MidCode#CLI#Security & Auth

Clickjacking & Frame Busting: How transparent iframe overlays work and frame-ancestors defenses.

Clickjacking tricks a victim into clicking on an invisible, transparent `` of a sensitive website (e.g. "Delete Account" or "Confirm Payment") while the victim believes they are clicking on a decoy button (e.g. "Play Game" or "Claim Prize").

37
Most AskedMidCode#CLI#Async & Promises

Subresource Integrity (SRI): Defending against compromised CDN scripts using cryptographic hashes.

Modern applications frequently load libraries (React, Bootstrap, jQuery, analytics) from third-party public Content Delivery Networks (CDNs). If an attacker compromises the CDN and alters the remote file, they instantly achieve Remote Code Execution across every website loading that script.

38
MidCode#CLI#Security & Auth

Tabnabbing & Reverse Tabnabbing: Exploiting window.opener in target="_blank" links and the rel fix.

When you open an external link using , the browser opens the page in a new tab. By default in older browsers, the newly opened page retains a reference to the referring window via the JavaScript property window.opener.

39
MidCode#CLI#Security & Auth

MIME Sniffing & File Content Confusion: How X-Content-Type-Options: nosniff blocks polyglot attacks.

Historically, when web servers served files with missing or incorrect Content-Type headers, browsers attempted to "sniff" the file content by inspecting its initial byte sequence. Attackers exploit this behavior using Polyglot Files.

40
MidCode#CLI#Security & Auth

HTTP Strict Transport Security (HSTS) & Preload List: Mitigating SSL Stripping attacks.

When users type example.com into a browser address bar, the browser initially connects via unencrypted plain HTTP (http://example.com). The server then sends an HTTP 301 redirect to https://example.com.

41
MidCode#CLI#Security & Auth

Permissions-Policy (Feature-Policy): Restricting browser hardware APIs (Camera, Mic, Geolocation).

Even if an attacker successfully injects a third-party script or executes a cross-site scripting attack, they should not be allowed to silently access hardware sensors or initiate browser payments. The Permissions-Policy HTTP header explicitly disables unused browser APIs.

42
Most AskedMidCode#CLI#Prototypes

Prototype Pollution in JavaScript: Recursive object merge flaws and defensive hardening techniques.

In JavaScript, objects inherit properties from Object.prototype. Prototype Pollution occurs when an attacker injects properties into a dynamic object using special keys like proto or constructor.prototype, causing properties to be added to all objects across the entire Node.js or browser runtime.

Part 5: API Security, DevSecOps & Enterprise Incident Handling (43 - 50)

8 Questions
43
SeniorCode#Security & Auth#Astro

Regular Expression Denial of Service (ReDoS): Catastrophic backtracking mechanics and safe regex engines.

Most programming languages (JavaScript, Python, Java) use Non-Deterministic Finite Automaton (NFA) regex engines. When an evil regular expression contains nested overlapping quantifiers, matching against an input that almost matches causes the engine to evaluate an exponential number of permutations (O(2^N)).

44
SeniorCode#Security & Auth#HTTP & REST APIs

Web Application Firewalls (WAF): Signature matching, anomaly detection, and Layer 7 DDoS mitigation.

A Web Application Firewall (WAF) sits at the network edge in front of your applications (e.g. AWS WAF, Cloudflare), inspecting incoming Layer 7 HTTP traffic to detect and block malicious payloads before they hit your compute servers.

45
SeniorCode#Forms#Security & Auth

Secure File Upload Architecture: Extension spoofing, MIME validation, magic bytes, and S3 sandboxing.

Allowing users to upload files is one of the most hazardous capabilities in web applications. Attackers upload Web Shells (e.g., shell.php, backdoor.jsp) and execute them directly on the web server.

46
SeniorCode#Security & Auth#System Design

GraphQL Security Architecture: Query depth limiting, complexity analysis, and disabling introspection.

Unlike REST APIs with fixed server-defined endpoints, GraphQL gives clients the power to request arbitrary nested schemas. Without safeguards, attackers can construct malicious queries that cause server denial of service.

47
Most AskedSeniorCode#Pipes#Security & Auth

DevSecOps & Shift-Left Security: Integrating SAST, DAST, SCA, and secret scanning into CI/CD pipelines.

"Shift-Left" means moving security checks from late-stage manual penetration testing directly into the developer's pull request workflow, catching vulnerabilities when they are cheapest to fix.

48
SeniorCode#Security & Auth#System Design

Enterprise Secrets Management: Zero-Secret-Leak architectures and dynamic credentials with Vault.

Hardcoding secrets (database passwords, API keys, private keys) in source code or Git history is the single most common cause of enterprise security breaches. Once committed, a secret must be assumed compromised even if the repository is private.

49
MidCode#Security & Auth#HTTP & REST APIs

Security Incident Response: Containment, forensic evidence preservation, and the GDPR 72-hour reporting rule.

When an active security breach occurs, chaotic reactions can destroy forensic evidence or trigger catastrophic legal liabilities. Enterprise teams operate under the NIST SP 800-61 Incident Handling Framework.

50
MidCode#Security & Auth#HTTP & REST APIs

How do you summarize your security philosophy and conclude an Application Security / DevSecOps Interview?

To conclude, my philosophy on application security centers on one primary tenet: Security is not a gatekeeper that slows down engineering; it is an enabler of velocity through paved roads and secure-by-default architecture.