{
    "title": "Remote code execution (RCE)",
    "seo_title": "Remote code execution (RCE): definition and examples",
    "h1": "Remote code execution (RCE)",
    "description": "RCE explained: what remote code execution is, the flaws that lead to it, real WordPress and PHP examples and the settings that limit its impact.",
    "lead": "Remote code execution (RCE) is a vulnerability that lets an attacker make a server run their own instructions over the network, without any legitimate access to it. It is one of the most severe types of vulnerability, because it often leads to a complete takeover of the site.",
    "language": "en",
    "locale": "en-US",
    "type": "definition",
    "url": "https://www.wp-feint.com/glossary/remote-code-execution/",
    "canonical": "https://www.wp-feint.com/glossary/remote-code-execution/",
    "markdown": "https://www.wp-feint.com/glossary/remote-code-execution/index.md",
    "json": "https://www.wp-feint.com/glossary/remote-code-execution/index.json",
    "published": "2026-10-28T08:00:00+00:00",
    "modified": "2026-11-22T12:08:23+00:00",
    "site": {
        "name": "WP Feint",
        "url": "https://www.wp-feint.com/"
    },
    "translations": [
        {
            "language": "en",
            "hreflang": "en-US",
            "title": "Remote code execution (RCE)",
            "url": "https://www.wp-feint.com/glossary/remote-code-execution/",
            "markdown": "https://www.wp-feint.com/glossary/remote-code-execution/index.md",
            "json": "https://www.wp-feint.com/glossary/remote-code-execution/index.json"
        },
        {
            "language": "fr",
            "hreflang": "fr-FR",
            "title": "Exécution de code à distance (RCE)",
            "url": "https://www.wp-feint.com/fr/definitions/execution-de-code-a-distance/",
            "markdown": "https://www.wp-feint.com/fr/definitions/execution-de-code-a-distance/index.md",
            "json": "https://www.wp-feint.com/fr/definitions/execution-de-code-a-distance/index.json"
        },
        {
            "language": "es",
            "hreflang": "es-ES",
            "title": "Ejecución remota de código (RCE)",
            "url": "https://www.wp-feint.com/es/glosario/ejecucion-remota-de-codigo/",
            "markdown": "https://www.wp-feint.com/es/glosario/ejecucion-remota-de-codigo/index.md",
            "json": "https://www.wp-feint.com/es/glosario/ejecucion-remota-de-codigo/index.json"
        },
        {
            "language": "de",
            "hreflang": "de-DE",
            "title": "Remote Code Execution (RCE)",
            "url": "https://www.wp-feint.com/de/glossar/remote-code-execution/",
            "markdown": "https://www.wp-feint.com/de/glossar/remote-code-execution/index.md",
            "json": "https://www.wp-feint.com/de/glossar/remote-code-execution/index.json"
        },
        {
            "language": "it",
            "hreflang": "it-IT",
            "title": "Esecuzione remota di codice (RCE)",
            "url": "https://www.wp-feint.com/it/glossario/esecuzione-remota-di-codice/",
            "markdown": "https://www.wp-feint.com/it/glossario/esecuzione-remota-di-codice/index.md",
            "json": "https://www.wp-feint.com/it/glossario/esecuzione-remota-di-codice/index.json"
        },
        {
            "language": "pt",
            "hreflang": "pt-BR",
            "title": "Execução remota de código (RCE)",
            "url": "https://www.wp-feint.com/pt/glossario/execucao-remota-de-codigo/",
            "markdown": "https://www.wp-feint.com/pt/glossario/execucao-remota-de-codigo/index.md",
            "json": "https://www.wp-feint.com/pt/glossario/execucao-remota-de-codigo/index.json"
        },
        {
            "language": "nl",
            "hreflang": "nl-NL",
            "title": "Remote code execution (RCE)",
            "url": "https://www.wp-feint.com/nl/woordenlijst/remote-code-execution/",
            "markdown": "https://www.wp-feint.com/nl/woordenlijst/remote-code-execution/index.md",
            "json": "https://www.wp-feint.com/nl/woordenlijst/remote-code-execution/index.json"
        }
    ],
    "headings": [
        {
            "level": 1,
            "text": "Remote code execution (RCE)"
        },
        {
            "level": 2,
            "text": "The paths that lead to RCE"
        },
        {
            "level": 2,
            "text": "Real-world examples"
        },
        {
            "level": 2,
            "text": "For WordPress: reducing the risk and the impact"
        }
    ],
    "body": "RCE is rarely a vulnerability family on its own: it is the most serious outcome that several kinds of mistakes can lead to. Once an attacker gets PHP to run their code, they act with the site's privileges: they read `wp-config.php` and therefore the database credentials, create accounts, plant a [backdoor](https://www.wp-feint.com/glossary/backdoor/) or use the server to send spam. That is why unauthenticated RCE vulnerabilities almost always receive the highest severity scores.\n\n## The paths that lead to RCE\n\n- **Code injection** (CWE-94): the program builds code from external data, for example with `eval()`. According to OWASP, the attacker is then limited only by what the language can do.\n- **Command injection**: data is passed to a system shell through `exec()`, `system()` or an equivalent. The attacker hijacks existing commands rather than writing PHP.\n- **File upload**: a form accepts a `.php` file and stores it in a folder reachable from the web.\n- **File inclusion** and **deserialization**: two mechanisms covered in the definitions of [file inclusion](https://www.wp-feint.com/glossary/file-inclusion/) and [insecure deserialization](https://www.wp-feint.com/glossary/insecure-deserialization/).\n- **Flaws in the language or the server**: PHP itself, or a system library it uses.\n\n![Five-step RCE scenario through file upload: the attacker sends a .php file through a form that checks neither the type nor permissions, the plugin saves it in wp-content/uploads, the attacker requests its URL, PHP runs the code with the site's privileges, then the attacker installs a backdoor and an administrator account](https://www.wp-feint.com/media/2026/10/rce-televersement-en.webp)\n\n## Real-world examples\n\n- **WP File Manager, CVE-2020-25213**: before version 6.9, the plugin renamed an example file from the elFinder library with a `.php` extension, which allowed remote attackers to upload and run PHP code. CVSS 3.1 score: 10.\n- **PHP-CGI on Windows, CVE-2024-4577**: an argument injection caused by Windows character conversion, in PHP before 8.1.29, 8.2.20 and 8.3.8 running in CGI mode. [Our explanation of this PHP-CGI flaw](https://www.wp-feint.com/php-cgi-cve-2024-4577-windows-flaw/) specifies which servers were affected.\n- **glibc iconv, CVE-2024-2961**: a flaw in a system library, made exploitable through PHP, covered in [our article on the iconv vulnerability](https://www.wp-feint.com/glibc-iconv-cve-2024-2961-php-flaw/).\n\n*Video: “What is Remote Code Execution (RCE)?” (Indusface)*\n\n## For WordPress: reducing the risk and the impact\n\n- Update plugins that handle files quickly (file managers, forms with attachments, import and export, backups).\n- Block PHP execution in `wp-content/uploads` at the web server level: that folder should only contain media.\n- Add `define( 'DISALLOW_FILE_EDIT', true );` to `wp-config.php` to disable the admin file editor.\n- Run a supported PHP version and ask your host how they handle `disable_functions` and `open_basedir`: hardening PHP limits what injected code can do.\n- A web application firewall blocks some known attempts, without replacing the update.\n\nWP Feint doesn't block RCE exploitation: it is neither a firewall nor an antivirus. After an intrusion, however, its [integrity check](https://www.wp-feint.com/features/wordpress-integrity-check/) flags modified, missing or unknown WordPress core files, one of the places where attackers hide their code. Plugin and theme files need to be checked by other means.\n\n## Related terms\n\n- [File inclusion (LFI / RFI)](https://www.wp-feint.com/glossary/file-inclusion/)\n- [Insecure deserialization](https://www.wp-feint.com/glossary/insecure-deserialization/)\n- [Backdoor](https://www.wp-feint.com/glossary/backdoor/)\n- [WAF (web application firewall)](https://www.wp-feint.com/glossary/waf/)\n- [Malware](https://www.wp-feint.com/glossary/malware/)\n\n\n## Sources\n\n- [MITRE CWE-94 : Improper Control of Generation of Code (Code Injection)](https://cwe.mitre.org/data/definitions/94.html)\n- [OWASP : Code Injection](https://community.owasp.org/attacks/Code_Injection)\n- [CVE Record : CVE-2020-25213](https://www.cve.org/CVERecord?id=CVE-2020-25213)\n- [CVE Record : CVE-2024-4577](https://www.cve.org/CVERecord?id=CVE-2024-4577)",
    "definition": "Remote code execution (RCE) is a vulnerability that lets an attacker make a server run their own instructions over the network, without any legitimate access to it. It is one of the most severe types of vulnerability, because it often leads to a complete takeover of the site.",
    "group": "Web security",
    "aka": [
        "RCE",
        "arbitrary code execution",
        "remote command execution",
        "code injection"
    ],
    "related": [
        {
            "title": "File inclusion (LFI / RFI)",
            "url": "https://www.wp-feint.com/glossary/file-inclusion/",
            "markdown": "https://www.wp-feint.com/glossary/file-inclusion/index.md"
        },
        {
            "title": "Insecure deserialization",
            "url": "https://www.wp-feint.com/glossary/insecure-deserialization/",
            "markdown": "https://www.wp-feint.com/glossary/insecure-deserialization/index.md"
        },
        {
            "title": "Backdoor",
            "url": "https://www.wp-feint.com/glossary/backdoor/",
            "markdown": "https://www.wp-feint.com/glossary/backdoor/index.md"
        },
        {
            "title": "WAF (web application firewall)",
            "url": "https://www.wp-feint.com/glossary/waf/",
            "markdown": "https://www.wp-feint.com/glossary/waf/index.md"
        },
        {
            "title": "Malware",
            "url": "https://www.wp-feint.com/glossary/malware/",
            "markdown": "https://www.wp-feint.com/glossary/malware/index.md"
        }
    ],
    "sources": [
        {
            "title": "MITRE CWE-94 : Improper Control of Generation of Code (Code Injection)",
            "url": "https://cwe.mitre.org/data/definitions/94.html"
        },
        {
            "title": "OWASP : Code Injection",
            "url": "https://community.owasp.org/attacks/Code_Injection"
        },
        {
            "title": "CVE Record : CVE-2020-25213",
            "url": "https://www.cve.org/CVERecord?id=CVE-2020-25213"
        },
        {
            "title": "CVE Record : CVE-2024-4577",
            "url": "https://www.cve.org/CVERecord?id=CVE-2024-4577"
        }
    ],
    "format": "application/json"
}