Skip to content
Fast-turnaround security assessments available — 10+ years development & security experienceGet started
Back to Glossary
Glossary2 min read

RCE (Remote Code Execution)

A critical vulnerability that allows an attacker to execute arbitrary code on a target system remotely.

Remote Code Execution (RCE) is a vulnerability that allows an attacker to run arbitrary code on a target machine from a remote location, without requiring physical access or prior authentication. RCE is consistently rated as one of the most severe vulnerability classes because it gives the attacker direct control over the affected system, enabling data theft, malware installation, lateral movement, and complete system compromise.

How It Works

RCE vulnerabilities arise when an application processes untrusted input in a way that leads to code execution. Common vectors include command injection, where user input is passed to a system shell; deserialization flaws, where malicious serialized objects trigger code execution when processed; and template injection, where user input is evaluated by a server-side template engine. File upload vulnerabilities that allow uploading executable files to web-accessible directories also frequently result in RCE.

The exploitation process varies by vector. In a command injection scenario, an attacker might submit ; cat /etc/passwd as input to a form field that gets passed to a system command. In a deserialization attack, the attacker crafts a serialized object that, when deserialized by the application, triggers a chain of method calls that ultimately execute an operating system command. Template injection exploits the powerful expression evaluation capabilities built into template engines to break out of the template sandbox and invoke system functions.

Once an attacker achieves code execution, they typically establish persistence by deploying a web shell or reverse shell, which provides ongoing command-line access to the compromised system. From there, the attacker can read sensitive files, access databases, pivot to other systems on the network, and escalate privileges to gain full administrative control.

Why It Matters

RCE vulnerabilities represent the worst-case scenario for application security because they eliminate the boundary between the attacker and the target system. A single RCE finding in a security assessment warrants immediate remediation. Prevention requires treating all user input as untrusted, avoiding direct execution of user-supplied data, using safe APIs that do not invoke system shells, and implementing strong input validation and sandboxing throughout the application.

Need your application tested? Get in touch.

Need your application tested?

We find these vulnerabilities in real applications every day.

Request an Assessment