RCE: Remote Code Execution Attacks & Defense

What is remote code execution? Remote code execution (RCE) is a bug that lets an attacker run their own commands or code on a server or device they reach over the network, without logging in to it or touching it. It’s the top of the impact ladder: once you have RCE you usually have the app’s data, its credentials and a foothold into everything it can talk to. Command injection, template injection, unsafe deserialization and executable file uploads are the most common ways web apps end up there. ...

April 10, 2026 · Updated November 2, 2026 · 38 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. Related guides: RCE — where a working SSTI payload usually ends up · Insecure Deserialization — the other server-side route from untrusted input to code execution · Python Security — Jinja2, Django and Flask hardening in context · XSS — what a template bug looks like when it renders in the browser instead of on the server. ...

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